/* --- Kontejner a hlavička --- */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.page-header h1 { margin: 0; }
.filter-form-reports label { margin-right: 10px; color: #a0a0a0; }
.filter-form-reports select { background-color: #3a3a3c; color: #f5f5f5; border: 1px solid #555; border-radius: 4px; padding: 10px; font-size: 1em; }
.table-container { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; min-width: 800px; border: 1px solid #3a3a3c; }
.stats-table th, .stats-table td { padding: 12px; text-align: right; border: 1px solid #3a3a3c; }
.stats-table thead th { background-color: #c0392b; color: #fff; font-weight: bold; text-align: center; }
.stats-table th.header-month { background-color: #333336; }
.stats-table td { background-color: #2a2a2e; color: #f5f5f5; }
.stats-table .cell-month { background-color: #27ae60; color: #fff; text-align: left; font-weight: bold; }
.stats-table tbody tr:hover td { background-color: #333336; }
.stats-table tfoot td { font-weight: bold; font-size: 1.1em; background-color: #1c1c1e; }
.stats-table tfoot .cell-month { background-color: #357ABD; }
.stats-table td.cell-split { padding: 5px 10px; vertical-align: middle; }
.stat-split { padding: 3px 0; font-size: 0.9em; white-space: nowrap; }
.account-label { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 0.75em; font-weight: bold; margin-right: 6px; color: #fff; vertical-align: middle; }
.account-label.cs { background-color: #3498db; }
.account-label.mbank { background-color: #c0392b; }

/* --- STYLY PRO MODÁLNÍ OKNO --- */
.stats-table .cell-month button.month-button {
    background: none; border: none; color: #fff; text-decoration: none; cursor: pointer; font-weight: bold; font-size: 1em;
    font-family: inherit; display: block; width: 100%; text-align: left; padding: 12px; margin: -12px; transition: background-color 0.2s;
}
.stats-table .cell-month button.month-button:hover { background-color: rgba(255, 255, 255, 0.1); text-decoration: underline; }
.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7);
    z-index: 100; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-backdrop.visible { opacity: 1; visibility: visible; }
.modal-content {
    background-color: #2a2a2e; border: 1px solid #3a3a3c; border-radius: 8px; padding: 25px;
    width: 90%; max-width: 900px; max-height: 80vh; display: flex; flex-direction: column;
    transform: scale(0.95); transition: transform 0.3s ease;
}
.modal-backdrop.visible .modal-content { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #3a3a3c; padding-bottom: 15px; margin-bottom: 15px; }
.modal-header h2 { margin: 0; }
.modal-close-btn { background: none; border: none; color: #a0a0a0; font-size: 2em; cursor: pointer; transition: color 0.2s; }
.modal-close-btn:hover { color: #fff; }
.modal-body { overflow-y: auto; }
.modal-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 10px; background-color: #1c1c1e; border-radius: 8px; margin-bottom: 25px; }
.summary-item { text-align: center; }
.summary-item span { display: block; color: #a0a0a0; font-size: 0.9em; margin-bottom: 5px; }
.summary-item strong { font-size: 1.4em; font-weight: bold; }
.summary-item.prijem strong { color: #2ecc71; }
.summary-item.vydaj strong { color: #e74c3c; }
.summary-item.bilance strong { color: #4a90e2; }
.modal-body-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.transaction-column h3 { margin-top: 0; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #3a3a3c; }
.no-results-modal { text-align: center; color: #a0a0a0; padding: 30px 0; }
.transaction-item { display: flex; align-items: center; margin-bottom: 15px; }
.transaction-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; margin-right: 15px; flex-shrink: 0; }
.transaction-icon.prijem { background-color: #27ae60; }
.transaction-icon.vydaj { background-color: #c0392b; }
.transaction-details { flex-grow: 1; }
.transaction-details strong { display: block; color: #f5f5f5; }
.transaction-details small { color: #a0a0a0; font-size: 0.85em; }
.transaction-amount { font-weight: bold; font-size: 1.1em; white-space: nowrap; }
.transaction-amount.prijem { color: #2ecc71; }
.transaction-amount.vydaj { color: #e74c3c; }

@media (max-width: 600px) {
    .modal-body-grid, .modal-summary { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 15px; align-items: stretch; }
    .stats-table th, .stats-table td { padding: 8px; }
    .stats-table { min-width: 600px; }
}