body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6; 
    color: #333;
    margin: 0;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container { 
    max-width: 800px; 
    margin: 0 auto;
}

h1, h2 { 
    text-align: center; 
    color: #2c3e50;
}

h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.card, .flow-section { 
    background: white; 
    padding: 25px; 
    border-radius: 12px; 
    margin-bottom: 20px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease-in-out;
}

.card:hover, .flow-section:hover {
    transform: translateY(-3px);
}

input[type="number"] { 
    width: 70px; 
    padding: 8px; 
    border: 1px solid #ddd; 
    border-radius: 6px;
    text-align: center;
    font-size: 1em;
    font-weight: bold;
}

.main-input {
    width: 100%; 
    font-size: 1.5em; 
    margin-top: 10px; 
    box-sizing: border-box;
}

label { 
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.main-split { 
    display: flex; 
    gap: 20px;
    flex-wrap: wrap; /* Для адаптивности на мобильных */
}

.flow-section { 
    flex: 1; 
    min-width: 300px; /* Для адаптивности на мобильных */
}

.sub-section { 
    margin-top: 20px; 
    padding-top: 20px; 
    border-top: 1px solid #eee; 
}

.result { 
    font-size: 1.5em; 
    font-weight: bold; 
    color: #007bff; 
    margin-top: 8px;
    text-align: right;
}

.main-total {
    font-size: 2em;
    color: #28a745;
}

/* Добавьте это в конец вашего style.css */

.stream-header, .category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Стилизация заголовка, чтобы его можно было редактировать */
.editable-title {
    cursor: pointer;
    border-bottom: 2px dotted transparent;
    transition: border-color 0.2s;
}
.editable-title:hover {
    border-color: #007bff;
}

.btn-add {
    width: 100%;
    padding: 15px;
    background-color: #e6fffa;
    color: #2c7a7b;
    border: 2px dashed #2c7a7b;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

.btn-add-category {
    width: 100%;
    padding: 10px;
    background: #f0f4f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 15px;
    cursor: pointer;
}

.delete-btn {
    cursor: pointer;
    font-size: 1.5em;
    color: #e53e3e;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.delete-btn:hover {
    opacity: 1;
}

/* Стили для модального окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
}
#category-list button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    text-align: left;
    background: #f7fafc;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}
#category-list button:hover {
    background: #e2e8f0;
}