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

:root {
    /* KC-Farben basierend auf KC-Logo */
    --kc-primary: #1E3A8A;      /* Dunkles Blau */
    --kc-secondary: #3B82F6;    /* Helles Blau */
    --kc-accent: #EF4444;       /* Rot */
    --kc-warm: #F59E0B;         /* Gelb/Orange */
    --kc-light: #EFF6FF;        /* Sehr helles Blau */
    --kc-dark: rgb(37, 52, 57); /* Exakte Farbe vom KC-Logo */
    --kc-text: #1F2937;         /* Dunkelgrau für Text */
    --kc-border: #E5E7EB;       /* Helles Grau für Borders */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--kc-primary);
    min-height: 100vh;
    padding: 20px;
    color: white;
    position: relative;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgb(37, 52, 57);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 30px;
    position: relative;
    z-index: 1;
    color: white;
}

/* Header mit Logo */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--kc-secondary);
    position: relative;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#site-name {
    margin-left: 20px;
    color: white;
    font-size: 1.8em;
    align-self: center;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-logo {
    max-height: 120px;
    width: auto;
}

header h1 {
    color: white;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    color: #E5E7EB;
    font-size: 1.1em;
}

/* Navigation */
.admin-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.nav-btn {
    padding: 12px 24px;
    background: var(--kc-light);
    border: 2px solid var(--kc-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    color: var(--kc-text);
    font-weight: 600;
}

.nav-btn:hover {
    background: var(--kc-secondary);
    color: white;
    border-color: var(--kc-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-btn.active {
    background: var(--kc-primary);
    color: white;
    border-color: var(--kc-primary);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* Sections */
.admin-section {
    display: none;
    margin-top: 30px;
}

.admin-section.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #475569;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: rgb(37, 52, 57);
    color: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94A3B8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--kc-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Einklappbares Dropdown für Filter */
#filter-wishes-admin-dropdown label:hover {
    background: rgba(59, 130, 246, 0.2);
}

#filter-wishes-admin-dropdown label input[type="checkbox"]:checked + span {
    color: var(--kc-secondary);
    font-weight: 600;
}

#filter-wishes-admin-button:hover {
    border-color: var(--kc-secondary);
}

/* Workshop-Beschreibung Textfeld - einheitliche Breite */
#workshop-description {
    width: 100% !important;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #CBD5E1;
    font-size: 0.9em;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: var(--kc-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    background: #1E40AF;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
    background: #64748B;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.btn-danger {
    background: var(--kc-accent);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Participant Selector */
.participant-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: rgb(37, 52, 57);
    border-radius: 10px;
    border-left: 4px solid var(--kc-secondary);
}

.participant-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: white;
}

.participant-selector select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #475569;
    border-radius: 8px;
    background: rgb(37, 52, 57);
    color: white;
}

/* Workshop List */
.workshop-list {
    margin-top: 20px;
}

.workshop-item {
    background: rgb(37, 52, 57);
    border: 2px solid #475569;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.workshop-item:hover {
    border-color: var(--kc-secondary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.workshop-item h3 {
    color: var(--kc-secondary);
    margin-bottom: 10px;
    font-size: 1.3em;
}

.workshop-item p {
    color: #CBD5E1;
    margin-bottom: 10px;
}

.priority-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.priority-selector label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
}

.priority-selector select {
    width: auto;
    padding: 8px 12px;
    border: 2px solid #475569;
    border-radius: 6px;
    background: rgb(37, 52, 57);
    color: white;
}

/* Items List */
.items-list {
    margin-top: 20px;
}

.item-card {
    background: rgb(37, 52, 57);
    border: 2px solid #475569;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

/* Linke Info-Spalte und rechte Button-Spalte in Workshop-Karten:
   Die Info-Spalte bekommt eine feste Breite, damit Beschreibungen visuell gleich breit wirken. */
.item-info {
    flex: 1 1 70%;
    max-width: 70%;
}

.item-actions {
    flex: 0 0 260px;
}

.item-card:hover {
    border-color: var(--kc-secondary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.item-info h3 {
    color: var(--kc-secondary);
    margin-bottom: 8px;
    font-size: 1.2em;
}

.item-info p {
    color: #CBD5E1;
    margin-bottom: 5px;
}

/* Workshop-Beschreibungen in der Übersicht - einheitliche Breite */
.workshop-description-display {
    min-width: 100%;
    width: 100%;
    display: block;
    word-wrap: break-word;
    box-sizing: border-box;
}

.item-actions {
    display: flex;
    gap: 10px;
}

/* Status Messages */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.status-message.success {
    background: #D1FAE5;
    color: #065F46;
    border: 2px solid #10B981;
    display: block;
}

.status-message.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 2px solid var(--kc-accent);
    display: block;
}

/* Einheitliche Rahmen für feste Info-Felder */
.info-field {
    margin-bottom: 20px;
    padding: 15px;
    background: rgb(37, 52, 57);
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    border-left: 6px solid var(--kc-secondary);
    color: #E5E7EB;
}

/* Info Box */
.info-box {
    margin-top: 30px;
    padding: 20px;
    background: rgb(37, 52, 57);
    border: 1px solid #E5E7EB;
    border-left: 6px solid var(--kc-secondary);
    border-radius: 10px;
}

.info-box h3 {
    color: var(--kc-secondary);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.info-box ul {
    margin-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
    color: #E5E7EB;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 59, 0.7);
    overflow: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--kc-dark);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    color: white;
}

.close {
    color: #CBD5E1;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--kc-accent);
}

/* Allocation Results */
.allocation-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.allocation-time {
    margin-bottom: 30px;
    padding: 20px;
    background: rgb(37, 52, 57);
    border-radius: 10px;
    border-left: 4px solid var(--kc-secondary);
}

.allocation-time h3 {
    color: var(--kc-secondary);
    margin-bottom: 15px;
    font-size: 1.5em;
}

.workshop-allocation {
    background: rgb(37, 52, 57);
    border: 2px solid #475569;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.workshop-allocation:hover {
    border-color: var(--kc-secondary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.workshop-allocation h4 {
    color: var(--kc-secondary);
    margin-bottom: 10px;
    font-size: 1.2em;
}

.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.participant-badge {
    background: rgb(37, 52, 57);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 3px solid var(--kc-secondary);
    color: white;
}

.statistics-box {
    margin-top: 30px;
    padding: 20px;
    background: rgb(37, 52, 57);
    border-radius: 10px;
    border-left: 4px solid var(--kc-secondary);
}

.statistics-box h3 {
    color: var(--kc-secondary);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #475569;
    color: white;
}

.stat-item:last-child {
    border-bottom: none;
}

/* Settings */
.settings-form {
    max-width: 600px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    font-weight: normal;
}

/* Login Page Styles */
.login-container {
    max-width: 450px;
    margin: 80px auto;
    padding: 40px;
    background: var(--kc-dark);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
    color: white;
}

.login-container .logo-container {
    margin-bottom: 30px;
}

.login-container h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.error-message {
    color: var(--kc-accent);
    background: #FEE2E2;
    padding: 12px;
    border-radius: 8px;
    display: none;
    border: 2px solid var(--kc-accent);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .logo-container {
        flex-direction: column;
    }

    .main-logo {
        max-height: 90px;
    }

    .admin-nav {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

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

    .item-actions {
        width: 100%;
        margin-top: 15px;
        flex-direction: column;
    }

    .item-actions .btn {
        width: 100%;
    }

    .allocation-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .login-container {
        margin: 40px auto;
        padding: 30px 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .btn, .admin-nav, .allocation-controls {
        display: none;
    }

    .allocation-time {
        page-break-inside: avoid;
    }
}
