/* --- MODERNÍ REDESIGN PRO SPRÁVU ÚČTŮ --- */

/* --- HLAVNÍ MŘÍŽKA --- */
.accounts-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 12 sloupců pro flexibilitu */
    gap: 30px;
}

/* --- KARTA PRO GRAF A CELKOVÝ MAJETEK --- */
.main-summary-card {
    grid-column: span 12; /* Na mobilech zabere celou šířku */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    background-color: #2a2a2e;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #3a3a3c;
}
.chart-container {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}
.totals-container {
    flex: 2;
    min-width: 250px;
}
.totals-container h2 {
    margin-top: 0;
    color: #f5f5f5;
    font-size: 1.5em;
    margin-bottom: 10px;
}
.totals-container .total-balance {
    font-size: 2.8em;
    font-weight: bold;
    color: #4a90e2; /* Modrá pro celkový součet */
    margin-bottom: 20px;
}
.totals-container .account-split {
    display: flex;
    justify-content: space-between;
    font-size: 1.1em;
    padding: 8px 0;
    border-bottom: 1px solid #3a3a3c;
}
.totals-container .account-split:last-child {
    border-bottom: none;
}
.totals-container .account-split span {
    color: #a0a0a0;
}

/* --- KARTA PRO JEDNOTLIVÝ ÚČET --- */
.account-card {
    grid-column: span 6; /* Dvě karty vedle sebe na desktopu */
    background-color: #2a2a2e;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #3a3a3c;
    display: flex;
    flex-direction: column;
}
.account-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.account-card-header h3 {
    margin: 0;
    font-size: 1.3em;
}
.account-card-header .bank-logo {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 6px;
    color: #fff;
}
.bank-logo.cs { background-color: #3498db; }
.bank-logo.mbank { background-color: #c0392b; }

.account-card .balance {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 20px;
}
.prijem { color: #2ecc71; }
.vydaj { color: #e74c3c; }

/* --- NOVÝ UNIVERZÁLNÍ FORMULÁŘ --- */
.account-action-form hr {
    border: 0;
    border-top: 1px solid #3a3a3c;
    margin: 20px 0;
}
.account-action-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.account-action-form input,
.account-action-form select {
    width: 100%;
    padding: 12px;
    background-color: #3a3a3c;
    color: #f5f5f5;
    border: 1px solid #555;
    border-radius: 6px;
    box-sizing: border-box;
}
.account-action-form .description-field {
    grid-column: span 2; /* Popis zabere dva sloupce */
}
.account-action-form button {
    grid-column: span 2; /* Tlačítko zabere dva sloupce */
    padding: 12px;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: #4a90e2;
}
.account-action-form button:hover {
    background-color: #357ABD;
}


/* --- RESPONZIVNÍ DESIGN --- */
@media (max-width: 1200px) {
    .main-summary-card {
        grid-column: span 12;
    }
    .account-card {
        grid-column: span 6;
    }
}

@media (max-width: 992px) {
    .account-card {
        grid-column: span 12; /* Karty pod sebou */
    }
}

@media (max-width: 600px) {
    .main-summary-card {
        padding: 20px;
        flex-direction: column;
    }
    .totals-container .total-balance {
        font-size: 2.2em;
        text-align: center;
    }
    .totals-container h2 {
        text-align: center;
    }
    .account-action-form .form-grid {
        grid-template-columns: 1fr; /* Všechny prvky formuláře pod sebou */
    }
    .account-action-form .description-field,
    .account-action-form button {
        grid-column: span 1; /* Reset na jeden sloupec */
    }
}