* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f9ff;
    color: #333;
}

/* Логин страница */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e88e5 0%, #0d47a1 100%);
}
/* Обновляем стили header */
header {
    background: #0b1d2f !important;
    color: white;
    padding: 0.5rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 120px;
    height: 26px;
}

.header-title {
    color: white;
    font-size: 13px;
    font-weight: bold;
}

.user-info {
    font-size: 14px;
    color: white;
}

.user-info a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    transition: all 0.3s;
}

.user-info a:hover {
    background-color: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Обновляем навигацию */
.main-nav {
    background-color: #0b1d2f;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.main-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    list-style: none;
    padding: 0 20px;
}

.main-nav li {
    margin-right: 0;
}

.main-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: white;
    border-bottom-color: #1e88e5;
    background-color: rgba(255,255,255,0.05);
}
.login-form {
    background: #0b1d2f;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 400px;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #1e88e5;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus {
    border-color: #1e88e5;
    outline: none;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #1e88e5;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: #0d47a1;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.user-hint {
    margin-top: 20px;
    padding: 15px;
    background-color: #e3f2fd;
    border-radius: 5px;
    font-size: 14px;
}

.user-hint ul {
    margin-top: 10px;
    padding-left: 20px;
}

.user-hint li {
    margin-bottom: 5px;
    font-family: monospace;
}

/* Основной layout */
header {
    background: linear-gradient(135deg, #1e88e5 0%, #0d47a1 100%);
    color: white;
    padding: 1rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.user-info {
    font-size: 14px;
}

.user-info a {
    color: white;
    text-decoration: none;
}

.user-info a:hover {
    text-decoration: underline;
}

.main-nav {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    list-style: none;
    padding: 0 20px;
}

.main-nav li {
    margin-right: 2rem;
}

.main-nav a {
    display: block;
    padding: 1rem 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #1e88e5;
    border-bottom-color: #1e88e5;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

/* Секции */
.welcome-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.resource-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.resource-card:hover {
    transform: translateY(-5px);
}

.resource-card h3 {
    color: #1e88e5;
    margin-bottom: 0.5rem;
}

/* История */
.history-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.date-filter {
    margin: 2rem 0;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-controls label {
    display: flex;
    flex-direction: column;
    font-weight: bold;
    color: #1e88e5;
}

.filter-controls input {
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    margin-top: 5px;
}

.total-amount {
    background: #e8f5e9;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    text-align: center;
}

.total-amount h3 {
    color: #2e7d32;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.history-table th,
.history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.history-table th {
    background-color: #1e88e5;
    color: white;
    font-weight: bold;
}

.history-table tr:hover {
    background-color: #f5f9ff;
}

.history-table td:nth-child(2) {
    text-align: right;
    font-family: monospace;
    font-weight: bold;
}

/* Документы */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.document-card h3 {
    color: #1e88e5;
    margin-bottom: 1rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn-secondary {
    padding: 8px 16px;
    background-color: #26a69a;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #00897b;
}

/* Настройки */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.settings-group {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-group h3 {
    color: #1e88e5;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

.settings-item {
    margin-bottom: 1rem;
}

.settings-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.settings-item select,
.settings-item input {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .resources-grid,
    .documents-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
}
/* Стили для графика */
.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 2rem 0;
    height: 400px;
    position: relative;
}

.no-data {
    background: #fff3cd;
    color: #856404;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin: 2rem 0;
    border: 1px solid #ffeaa7;
}

/* Анимация загрузки */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e88e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность для графика */
@media (max-width: 768px) {
    .chart-container {
        height: 300px;
        padding: 1rem;
    }
}
/* Стили для группированной таблицы */
.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.history-table th {
    background-color: #0b1d2f;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.history-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.amount-cell {
    font-weight: 600;
    text-align: right;
    font-family: 'Courier New', monospace;
    color: #1e88e5;
}

/* Кнопка деталей */
.btn-details {
    background: #e3f2fd;
    color: #0b1d2f;
    border: 1px solid #bbdefb;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-details:hover {
    background: #bbdefb;
}

/* Строка с деталями */
.details-row {
    background: #f8fdff !important;
}

.details-content {
    padding: 1rem;
    background: #f0f8ff;
    border-radius: 5px;
    margin: 0.5rem 0;
}

.details-content h4 {
    margin: 0 0 0.5rem 0;
    color: #0b1d2f;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.details-table th {
    background: #e3f2fd;
    color: #0b1d2f;
    padding: 0.5rem;
    font-weight: 500;
}

.details-table td {
    padding: 0.4rem 0.5rem;
    border: 1px solid #e0e0e0;
    font-size: 12px;
}

.details-table tr:nth-child(even) {
    background: #fafafa;
}

/* Адаптивность */
@media (max-width: 768px) {
    .history-table {
        font-size: 14px;
    }
    
    .history-table th,
    .history-table td {
        padding: 0.6rem 0.5rem;
    }
    
    .btn-details {
        font-size: 11px;
        padding: 0.3rem 0.6rem;
    }
    
    .details-content {
        padding: 0.5rem;
    }
}
/* Стили для группированной таблицы */
.history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.history-table th {
    background-color: #0b1d2f;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.history-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.amount-cell {
    font-weight: 600;
    text-align: right;
    font-family: 'Courier New', monospace;
    color: #1e88e5;
}

/* Кнопка деталей */
.btn-details {
    background: #e3f2fd;
    color: #0b1d2f;
    border: 1px solid #bbdefb;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-details:hover {
    background: #bbdefb;
}

/* Строка с деталями */
.details-row {
    background: #f8fdff !important;
}

.details-content {
    padding: 1rem;
    background: #f0f8ff;
    border-radius: 5px;
    margin: 0.5rem 0;
}

.details-content h4 {
    margin: 0 0 0.5rem 0;
    color: #0b1d2f;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

.details-table th {
    background: #e3f2fd;
    color: #0b1d2f;
    padding: 0.5rem;
    font-weight: 500;
}

.details-table td {
    padding: 0.4rem 0.5rem;
    border: 1px solid #e0e0e0;
    font-size: 12px;
}

.details-table tr:nth-child(even) {
    background: #fafafa;
}

/* Адаптивность */
@media (max-width: 768px) {
    .history-table {
        font-size: 14px;
        min-width: 400px;
    }
    
    .history-table th,
    .history-table td {
        padding: 0.6rem 0.5rem;
    }
    
    .btn-details {
        font-size: 11px;
        padding: 0.3rem 0.6rem;
    }
    
    .details-content {
        padding: 0.5rem;
    }
}
/* Стили для страницы документов */
.documents-section {
    max-width: 1200px;
    margin: 0 auto;
}

.upload-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-form {
    margin-top: 1rem;
}

.files-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.file-card {
    background: #f8fdff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e3f2fd;
    transition: transform 0.3s;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.file-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.file-info h4 {
    color: #0b1d2f;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.file-info p {
    margin: 0.3rem 0;
    color: #666;
    font-size: 0.9rem;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-danger {
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.no-files {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
}

.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Адаптивность */
@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .file-actions {
        flex-direction: column;
    }
    
    .file-actions a {
        text-align: center;
    }
}
/* Стили для формы отчета */
.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range input {
    flex: 1;
}

.date-range span {
    color: #666;
    font-size: 0.9rem;
}

/* Модальное окно для отчета */
.modal {
    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;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    color: #0b1d2f;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Сообщения */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
    font-weight: 500;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Адаптивность */
@media (max-width: 768px) {
    .date-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-range span {
        text-align: center;
        margin: 0.5rem 0;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
}