:root {
    --primary: #d17a02;
    --primary-hover: #f7a837;
    --edit-mode: #2196F3; /* Blau für Bearbeiten */
    --edit-mode-hover: #1976D2;
    --bg-dark: #221a11;
    --card-bg: #3b2a1e;
    --card-header-bg: #2f2218;
    --border: #5c412d;
    --text: #f0f0f0;
    --text-muted: #aaaaaa;
    --success: #4CAF50;
    --danger: #ff4d4d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Barlow', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

/* --- HEADER --- */
.admin-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 15px; font-weight: 700; color: var(--primary); letter-spacing: 1px; }
.brand img { height: 35px; }

/* --- STATS BAR --- */
.stats-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.stat-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 150px;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px; }
.stat-value { font-size: 1.5rem; font-weight: bold; color: var(--primary); }
.stat-value.small { font-size: 1.1rem; color: #fff; }

/* --- LAYOUT --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    align-items: start;
}
@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

.col-left { display: flex; flex-direction: column; gap: 30px; }
.col-right { display: flex; flex-direction: column; }
.mb-30 { margin-bottom: 30px; }
.mt-30 { margin-top: 30px; }

/* --- CARDS --- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: 0.3s;
}
.card-header {
    background: var(--card-header-bg);
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header h3 { font-size: 1.1rem; color: #fff; text-transform: uppercase; margin: 0; display: flex; align-items: center; gap: 10px; }

/* Header Highlights */
.card-header.highlight { border-bottom: 2px solid var(--primary); }
.card-header.highlight h3 { color: var(--primary); }
.card-header.highlight-edit { border-bottom: 2px solid var(--edit-mode); }
.card-header.highlight-edit h3 { color: var(--edit-mode); }

.card-body { padding: 20px; }
.icon { font-size: 1.2em; }

/* --- FORMS --- */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.section-label { display: block; color: var(--primary); font-weight: bold; margin: 15px 0 10px 0; }

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    background: #251c14;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border 0.3s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
.row { display: flex; gap: 15px; }
.half { flex: 1; }
.divider { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

/* --- SEARCH INPUT --- */
.header-top-row { width: 100%; display: flex; justify-content: space-between; margin-bottom: 10px; }
.flex-column-align-start { flex-direction: column; align-items: flex-start; }
.search-input { 
    background: rgba(0,0,0,0.2); 
    border-radius: 20px; 
    padding: 8px 15px; 
    font-size: 0.9rem; 
    width: 100%; 
    border-color: transparent;
}
.search-input:focus { border-color: var(--primary); background: #251c14; }

/* --- BUTTONS --- */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block; padding: 10px 20px; border-radius: 4px;
    text-decoration: none; font-weight: 600; text-transform: uppercase;
    text-align: center; cursor: pointer; border: none; transition: 0.2s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #221a11; }
/* Button Farbe ändert sich im Edit Mode */
.highlight-edit ~ .card-body .btn-primary { background: var(--edit-mode); }
.highlight-edit ~ .card-body .btn-primary:hover { background: var(--edit-mode-hover); }

.btn-secondary { background: #5c412d; color: #ddd; }
.btn-secondary:hover { background: #6d4f3a; color: #fff; }

.btn-small-cancel { font-size: 0.8rem; color: #aaa; text-decoration: underline; }
.btn-small-cancel:hover { color: #fff; }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-muted); font-size: 0.85rem; padding: 5px 15px; }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.full-width { width: 100%; }

/* --- EVENT LIST STYLING --- */
.event-list-container { max-height: 800px; overflow-y: auto; }

.event-row {
    display: flex;
    background: rgba(0,0,0,0.2);
    margin-bottom: 10px;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s;
    border-left: 4px solid #888; 
}
.event-row:hover { transform: translateX(2px); background: rgba(0,0,0,0.3); }

.event-row.public { border-left-color: #4CAF50; }
.event-row.private { border-left-color: #ff4d4d; }
.event-row.past-event { opacity: 0.6; border-left-color: #555; }

.event-date-box {
    background: rgba(0,0,0,0.2);
    padding: 10px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    min-width: 75px; text-align: center;
}
.event-date-box .date { font-weight: bold; font-size: 1rem; color: #fff; }
.event-date-box .year { font-size: 0.75rem; color: var(--text-muted); }

.event-details { padding: 10px 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.event-details h4 { margin-bottom: 4px; font-size: 1rem; color: #eee; }
.event-details .meta { font-size: 0.85rem; color: var(--text-muted); display: flex; gap: 15px; }
.badge-past { font-size: 0.7rem; background: #444; color: #bbb; padding: 1px 5px; border-radius: 3px; display: inline-block; width: fit-content; margin-top: 3px; }

.event-actions { display: flex; align-items: center; padding: 0 10px; gap: 5px; }
.action-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px; color: var(--text-muted); text-decoration: none;
    font-size: 1.1rem; transition: 0.2s; border: 1px solid transparent;
}
.action-btn:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: var(--border); }
.action-btn.edit:hover { color: var(--edit-mode); }
.action-btn.duplicate:hover { color: var(--primary); }
.action-btn.delete:hover { background: var(--danger); border-color: var(--danger); }
.action-btn.restore:hover { color: var(--success); }

.archived-list .event-row { padding: 10px; align-items: center; opacity: 0.7; }
.archived-list .event-row:hover { opacity: 1; }

/* --- UTILS --- */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.login-card { width: 100%; max-width: 400px; padding: 40px; }
.text-error { color: var(--danger); text-align: center; margin-bottom: 15px; }

.alert { padding: 15px; margin-bottom: 20px; border-radius: 4px; text-align: center; border: 1px solid; }
.alert.success { background: rgba(76, 175, 80, 0.1); border-color: var(--success); color: #81c784; }
.alert.error { background: rgba(244, 67, 54, 0.1); border-color: var(--danger); color: #e57373; }
.alert.info { background: rgba(33, 150, 243, 0.1); border-color: #2196F3; color: #64b5f6; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #221a11; }
::-webkit-scrollbar-thumb { background: #5c412d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }