/* Schweden Urlaub 2026 - Dark Mode */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --bg-input: #475569;
    --bg-hover: #3b4f6b;
    
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --yellow: #fbbf24;
    --green: #22c55e;
    --red: #ef4444;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border: #475569;
    
    --nav-height: 70px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 10px);
    line-height: 1.5;
}

/* ==================== HEADER ==================== */
header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 20px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==================== MAIN ==================== */
main {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== PAGES ==================== */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== SECTION TITLES ==================== */
h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--yellow);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==================== CARDS ==================== */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    position: relative;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    background: var(--blue);
}

.badge.small {
    padding: 3px 8px;
    font-size: 0.7rem;
}

.amount {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--yellow);
}

/* ==================== SCHULDEN ==================== */
.schulden-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-left: 4px solid var(--blue);
}

.saldo {
    font-weight: 600;
    font-size: 0.9rem;
}

.saldo.positive { color: var(--green); }
.saldo.negative { color: var(--red); }

/* ==================== FORMS ==================== */
.add-form {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-primary);
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2394a3b8' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

/* ==================== CHECKBOX GROUP ==================== */
.checkbox-group {
    margin-bottom: 12px;
}

.checkbox-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-input);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.checkbox-item:has(input:checked) {
    background: var(--blue);
    border-color: var(--blue);
}

.checkbox-item input {
    display: none;
}

.checkbox-item span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ==================== TOGGLE ==================== */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.toggle-label input {
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    accent-color: var(--blue);
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:active {
    background: var(--blue-dark);
}

.btn-secondary {
    padding: 12px 20px;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:active {
    background: var(--bg-tertiary);
}

.btn-danger {
    padding: 12px 20px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:active {
    background: #b91c1c;
}

.btn-edit {
    padding: 8px 16px;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 10px;
}

.btn-delete {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    padding: 4px;
}

.btn-delete:hover { opacity: 1; }

.btn-delete-small,
.btn-edit-small {
    background: var(--bg-input);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-edit-small:hover {
    background: var(--accent);
    color: white;
}

.btn-delete-small:hover {
    background: #e74c3c;
    color: white;
}

.ausgabe-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: stretch;
}

.ausgabe-buttons .btn-edit,
.ausgabe-buttons .btn-delete {
    margin-top: 0;
    padding: 8px 16px;
    background: var(--bg-input);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ausgabe-buttons .btn-delete {
    position: static;
    opacity: 1;
    font-size: 1rem;
}

.ausgabe-buttons .btn-edit:hover {
    background: var(--bg-tertiary);
}

.ausgabe-buttons .btn-delete:hover {
    background: #e74c3c;
}

.btn-beleg {
    background: var(--bg-input);
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-beleg:hover {
    background: var(--bg-tertiary);
}

.btn-beleg:active {
    transform: scale(0.95);
}

/* ==================== CHECK LIST ==================== */
.check-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==================== PACKLISTE KATEGORIEN ==================== */
.pack-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pack-category {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.pack-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}

.pack-category-title {
    font-weight: 600;
    color: var(--text-primary);
}

.pack-category-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 4px 10px;
    border-radius: 12px;
}

.pack-category-items {
    display: flex;
    flex-direction: column;
}

.pack-category-items .check-item {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
}

.pack-category-items .check-item:last-child {
    border-bottom: none;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.check-item.done {
    opacity: 0.5;
}

.check-item.done .check-text {
    text-decoration: line-through;
}

.check-item.pending {
    border-left: 4px solid var(--yellow);
}

.check-item.paid {
    border-left: 4px solid var(--green);
}

.check-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    cursor: pointer;
}

.check-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    accent-color: var(--green);
    flex-shrink: 0;
}

.check-text {
    flex: 1;
    font-size: 0.95rem;
}

.check-text small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.price {
    font-weight: 600;
    color: var(--yellow);
    font-size: 0.9rem;
}

/* Pack-Select Dropdown */
.pack-select {
    padding: 6px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    min-width: 70px;
    text-align: center;
    appearance: none;
    background-image: none;
}

/* ==================== FILTER TABS ==================== */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.tab {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

/* ==================== TOTAL DISPLAY ==================== */
.total-display {
    text-align: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-top: 16px;
    font-weight: 600;
    color: var(--yellow);
    border: 1px solid var(--border);
}

/* ==================== AUSGABEN ITEMS ==================== */
.ausgabe-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    position: relative;
}

.ausgabe-item.pending {
    border-left: 4px solid var(--yellow);
}

.ausgabe-item.paid {
    border-left: 4px solid var(--green);
}

.ausgabe-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ausgabe-title {
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
    padding-right: 30px;
}

.ausgabe-amount {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--yellow);
}

.ausgabe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ausgabe-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ausgabe-status.pending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--yellow);
}

.ausgabe-status.paid {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#confirm-modal {
    z-index: 3000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
}

.modal-content h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-right: 30px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

/* ==================== BOTTOM NAVIGATION ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--nav-height) + var(--safe-bottom));
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: var(--safe-bottom);
    z-index: 1000;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bottom-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    min-width: 46px;
    flex: 1;
}

.nav-item.active {
    color: var(--blue);
}

.nav-item.hidden {
    opacity: 0.3;
    font-size: 0.7rem;
}

.nav-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 500;
}

/* ==================== TEILNEHMER ==================== */
.teilnehmer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.teilnehmer-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.teilnehmer-card .name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* ==================== COUNTDOWN ==================== */
.countdown-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.countdown-emoji {
    font-size: 3rem;
    margin-bottom: 8px;
}

.countdown-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.countdown-days {
    font-size: 4rem;
    font-weight: 800;
    color: var(--yellow);
    line-height: 1;
}

.countdown-hours {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.countdown-label {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 8px;
}

/* ==================== WETTER-WIDGET ==================== */
.weather-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.weather-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 12px;
}

.weather-icon {
    font-size: 2.5rem;
}

.weather-temp {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.weather-desc {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.weather-wind {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.weather-forecast {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.weather-day {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.weather-day .day-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.weather-day .day-icon {
    font-size: 1.2rem;
}

.weather-day .day-temp {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== UNTERKUNFT ==================== */
.unterkunft-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.unterkunft-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.unterkunft-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--yellow);
    margin-bottom: 8px;
}

.unterkunft-detail {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.btn-small {
    display: inline-block;
    background: var(--blue);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    margin-top: 12px;
    transition: background 0.2s;
}

.btn-small:hover {
    background: var(--blue-dark);
}

/* Unterkunft Karte */
.unterkunft-map {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.unterkunft-map iframe {
    width: 100%;
    height: 180px;
    border: none;
    border-radius: 12px;
}

.map-overlay-link {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: background 0.2s;
}

.map-overlay-link:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* ==================== WÄHRUNGSRECHNER ==================== */
/* Gesamtkosten Stat Cards */
.stat-card.gesamt {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.stat-card.gesamt .stat-value {
    color: #3b82f6;
    font-size: 1.4rem;
}

.stat-card.gesamt .stat-label {
    color: #60a5fa;
}

/* Bezahlt Stat Cards */
.stat-card.bezahlt {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.stat-card.bezahlt .stat-value {
    color: #22c55e;
}

.stat-card.bezahlt .stat-label {
    color: #4ade80;
}

/* Geplante Kosten Stat Cards */
.stat-card.geplant {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.stat-card.geplant .stat-value {
    color: #f59e0b;
}

.stat-card.geplant .stat-label {
    color: #fbbf24;
}

.currency-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.currency-card h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.currency-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.currency-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.currency-input input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-align: center;
    width: 100%;
}

.currency-input input:focus {
    outline: none;
    border-color: var(--accent);
}

.currency-label {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.currency-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.currency-rate {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ==================== SCHULDEN-AUSGLEICH ==================== */
.ausgleich-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
}

.ausgleich-arrow, .zahlung-arrow {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==================== ZAHLUNGEN ==================== */
.zahlung-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    position: relative;
}

.zahlung-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.zahlung-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.zahlung-details .datum {
    color: var(--text-muted);
}

.beleg-link {
    color: var(--blue);
    text-decoration: none;
}

.btn-secondary {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

/* ==================== FINANZ-TIMELINE ==================== */
.timeline-container {
    margin-top: 12px;
}

.timeline {
    position: relative;
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 0 8px 0;
    margin-top: 8px;
    border-top: 1px solid var(--border);
}

.timeline-date:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid var(--border);
}

.timeline-item.timeline-ausgabe {
    border-left-color: var(--green);
}

.timeline-item.timeline-einkauf {
    border-left-color: var(--yellow);
}

.timeline-item.timeline-zahlung {
    border-left-color: var(--blue);
}

.timeline-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.timeline-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.timeline-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-betrag {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ==================== BELEG UPLOAD ==================== */
.beleg-upload {
    margin: 16px 0;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.btn-upload {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: var(--bg-input);
    border: 2px dashed var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-upload:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--bg-hover);
}

.beleg-preview {
    position: relative;
    margin-top: 10px;
}

.beleg-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    display: block;
}

.beleg-preview .pdf-preview {
    background: var(--bg-input);
    padding: 12px;
    border-radius: 8px;
    color: var(--text-secondary);
}

.btn-remove-beleg {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--red);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 768px) {
    main {
        padding: 24px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .teilnehmer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== INFO SEITE ==================== */
.info-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.info-card-icon {
    font-size: 1.8rem;
}

.info-card-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.info-card-content {
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

.info-value a {
    color: var(--accent);
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.info-rules {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-rules li {
    color: var(--text-secondary);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    padding-left: 24px;
    position: relative;
}

.info-rules li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--yellow);
}

.info-rules li:last-child {
    border-bottom: none;
}

.info-card-docs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.doc-item:hover {
    background: var(--bg-hover);
}

.doc-item-icon {
    font-size: 1.2rem;
}

.doc-item-title {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.doc-item-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
}

.doc-item-delete:hover {
    color: var(--red);
}

.btn-add-doc {
    width: 100%;
    padding: 12px;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 2px dashed var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-doc:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.btn-add-card {
    width: 100%;
    padding: 16px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px dashed var(--border);
    border-radius: 16px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-add-card:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.info-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-icon {
    background: var(--bg-input);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--bg-hover);
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.field-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.field-row input {
    flex: 1;
}

.btn-remove-field {
    background: var(--bg-input);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.btn-remove-field:hover {
    background: var(--red);
    color: white;
}

/* Personen Tab */
.person-card-expanded {
    padding: 0;
    overflow: hidden;
}

.person-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.person-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.person-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.person-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.person-name {
    font-weight: 500;
    color: var(--text-primary);
}

.person-total {
    font-size: 0.85rem;
    color: var(--green);
    font-weight: 600;
}

.person-actions {
    display: flex;
    gap: 8px;
}

.person-kosten {
    border-top: 1px solid var(--border);
    padding: 8px 16px 12px;
    background: var(--bg-secondary);
}

.kosten-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.kosten-item span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.kosten-total {
    display: flex;
    justify-content: space-between;
    padding: 8px 0 0;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-primary);
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.color-picker-row label {
    color: var(--text-secondary);
}

.color-picker-row input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

/* Admin Bereich */
.admin-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.admin-section h3 {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-form input {
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.admin-form .form-row {
    display: flex;
    gap: 12px;
}

.admin-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-form .form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-form .form-group input {
    width: 100%;
}

/* ==================== GALERIE ==================== */
.galerie-upload {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.upload-btn-large {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upload-btn-large:hover,
.upload-btn-large:active {
    border-color: var(--blue);
    background: var(--bg-hover);
}

.upload-btn-large .upload-icon {
    font-size: 1.3rem;
}

.upload-btn-large.upload-camera {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
}

/* Upload Preview */
.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Upload Actions */
.upload-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.uploader-select {
    flex: 1;
    min-width: 120px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.upload-actions .btn-primary {
    padding: 10px 20px;
}

.btn-cancel {
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Galerie Grid */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.galerie-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    background: var(--bg-secondary);
}

.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.galerie-item:active img {
    transform: scale(1.05);
}

.galerie-uploader {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#lightbox-uploader {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

#lightbox-date {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
}

.btn-delete-lightbox {
    background: var(--red);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Mobile Anpassungen für Galerie */
@media (max-width: 400px) {
    .galerie-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }
    
    .upload-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .lightbox-prev {
        left: 5px;
    }
    
    .lightbox-next {
        right: 5px;
    }
}
