/* assets/style.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6; color: #333; margin: 0; padding: 0 10px 20px 10px;
}
.container { max-width: 1200px; margin: 0 auto; background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
h1, h2, h3 { color: #444; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-top: 0; }
a { color: #007bff; text-decoration: none; }
a:hover { text-decoration: underline; }
nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; }
input, select, button { width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 16px; }
button { background-color: #007bff; color: white; cursor: pointer; border: none; }
button:hover { background-color: #0056b3; }
.error { color: #dc3545; background-color: #f8d7da; border: 1px solid #f5c6cb; padding: 10px; border-radius: 4px; margin-bottom: 15px; }
.summary { display: flex; flex-wrap: wrap; justify-content: space-around; background-color: #f8f9fa; padding: 20px; border-radius: 5px; margin-bottom: 30px; text-align: center; font-size: 1.2em; gap: 15px; }
.summary div span { display: block; font-size: 0.8em; color: #6c757d; }
.summary .income { color: #28a745; }
.summary .expense { color: #dc3545; }
.summary .profit { color: #17a2b8; }
.forms-wrapper, .lists-wrapper { display: flex; flex-wrap: wrap; gap: 30px; }
.forms-wrapper > form, .lists-wrapper > div { flex: 1; min-width: 300px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px; border-bottom: 1px solid #ddd; text-align: left; }
th { background-color: #f2f2f2; }
td a { margin-right: 10px; }

/* !! НОВЫЕ СТИЛИ ДЛЯ ГРАФИКОВ И СПОЙЛЕРА !! */
details { border: 1px solid #ddd; border-radius: 5px; margin-bottom: 20px; }
details > summary {
    font-weight: bold; cursor: pointer; padding: 15px; background-color: #f8f9fa; border-radius: 4px;
    list-style: none; /* Убираем стандартный маркер */
}
details > summary::-webkit-details-marker { display: none; } /* Убираем маркер в Chrome/Safari */
details[open] > summary { border-bottom: 1px solid #ddd; }
.chart-container { padding: 20px; }
.chart-tabs { margin-bottom: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.chart-tabs button {
    width: auto; background-color: #e9ecef; color: #495057; border: 1px solid #dee2e6;
}
.chart-tabs button.active { background-color: #007bff; color: #fff; border-color: #007bff; }
.chart-canvas-wrapper {
    position: relative;
    max-height: 400px; /* Ограничиваем высоту, чтобы не было слишком громоздко */
}
/* !! НОВОЕ: Стили для единой таблицы операций !! */
.amount-income {
    color: #28a745; /* Зеленый */
    font-weight: bold;
}
.amount-expense {
    color: #dc3545; /* Красный */
    font-weight: bold;
}
/* !! НОВОЕ: Визуальное разделение строк в ленте операций !! */
tr.transaction-income {
    background-color: #f0f9f4; /* Очень светлый зеленый */
    border-left: 3px solid #28a745;
}
tr.transaction-expense {
    background-color: #fef0f1; /* Очень светлый красный */
    border-left: 3px solid #dc3545;
}

td.transaction-icon {
    width: 25px; /* Фиксированная ширина для иконки */
    text-align: center;
    font-size: 1.3em;
    padding-left: 10px !important;
    padding-right: 0 !important;
}
