/* =========================================
   Globale Styles & Header
   ========================================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ecf0f1; /* Hell */
    color: #2c3e50; /* Dunkel */
    margin: 0;
    padding: 0;
}

header {
    background-color: #2c3e50; /* Dunkel */
    color: #ecf0f1; /* Hell */
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 1.5em;
    color: #3498db; /* Primär */
}

.dashboard-container {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* =========================================
   Budget Grid & Kacheln (PWA Layout)
   ========================================= */
.budget-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Spalten für mobile Ansicht */
    gap: 15px;
    margin-bottom: 25px;
}

.budget-card {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border-left: 5px solid #95a5a6; /* Grau als Fallback */
}

/* Kacheln farblich passend zum Masterplan absetzen */
.income-card { border-left-color: #2ecc71; }    /* Sekundär / Einnahmen */
.expense-card { border-left-color: #e74c3c; }   /* Gefahr / Ausgaben */
.available-card { border-left-color: #3498db; } /* Primär / Verfügbar */
.daily-card { border-left-color: #f39c12; }     /* Warnung (Gelb) / Tagesbudget */

.card-label {
    font-size: 0.75em;
    text-transform: uppercase;
    color: #95a5a6; /* Grau */
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50; /* Dunkel */
}

/* =========================================
   Aktionsleiste & Buttons
   ========================================= */
.action-bar {
    margin-bottom: 25px;
}

.btn-block {
    display: block;
    width: 100%;
    font-size: 1.1em;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

/* =========================================
   Ampelsystem (Status Indikator)
   ========================================= */
.traffic-light {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #95a5a6; /* Grau (Standard, wenn keine Daten da sind) */
    border: 2px solid #ecf0f1;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.status-green { background-color: #2ecc71; }
.status-yellow { background-color: #f39c12; }
.status-red { background-color: #e74c3c; }
/* style.css - Budget Buddy Design */

:root {
    /* Farbpalette aus dem Masterplan */
    --primary: #3498db;    /* Buttons, Akzente */
    --secondary: #2ecc71;  /* Einnahmen, Positive Werte */
    --danger: #e74c3c;     /* Ausgaben, Negative Werte, Fehler */
    --warning: #f39c12;    /* Gelber Status */
    --dark: #2c3e50;       /* Header, Text */
    --light: #ecf0f1;      /* Hintergrund */
    --gray: #95a5a6;       /* Sekundärer Text */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 450px; /* Perfekt für PWA / Mobile First */
}

header {
    text-align: center;
    margin-bottom: 25px;
}

h1 {
    color: var(--primary);
    margin-bottom: 5px;
}

h2, h3 {
    color: var(--dark);
}

p {
    color: var(--gray);
    margin-top: 0;
    font-size: 0.9em;
}

/* Formular-Elemente */
input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid var(--gray);
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary);
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: var(--gray);
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}
/* =========================================
   Modal Styles (Transaktionen)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dunkel (#2c3e50) mit 60% Transparenz */
    background-color: rgba(44, 62, 80, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Hilfsklasse zum Ausblenden */
.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background-color: #ecf0f1; /* Hell */
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: #2c3e50; /* Dunkel */
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #3498db; /* Primär */
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #95a5a6; /* Grau */
    border-radius: 4px;
    box-sizing: border-box; /* Wichtig für mobiles PWA-Layout */
    font-size: 1em;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

/* Buttons (falls noch nicht global in der style.css definiert) */
button {
    cursor: pointer;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
}

.btn-primary {
    background-color: #3498db; /* Primär */
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6; /* Grau */
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}
/* =========================================
   Transaktions-Historie
   ========================================= */
.transaction-history {
    margin-top: 20px;
    padding: 15px;
    background-color: #ecf0f1; /* Hell */
    border-radius: 8px;
    color: #2c3e50; /* Dunkel */
}

.transaction-history h3 {
    margin-top: 0;
    color: #3498db; /* Primär */
    border-bottom: 2px solid #bdc3c7;
    padding-bottom: 10px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #bdc3c7;
}

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

.trans-info {
    display: flex;
    flex-direction: column;
}

.trans-desc {
    font-weight: bold;
}

.trans-date-cat {
    font-size: 0.8em;
    color: #95a5a6; /* Grau */
}

.trans-amount {
    font-weight: bold;
    font-size: 1.1em;
}

/* Dynamische Farben für Beträge */
.amount-income {
    color: #2ecc71; /* Sekundär / Positiv */
}

.amount-expense {
    color: #e74c3c; /* Gefahr / Negativ */
}