* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2c2566;
    --primary-dark: #141225;
    --success: #04cc40;
    --danger: #bb3131;
    --warning: #f5be0b;
    --bg-light: #f0eff8;
    --bg-white: #ffffff;
    --text-dark: #000000;
    --text-gray: #787b80;
    --border: #d5e4f3;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: var(--bg-white);
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

h1 {
    color: var(--primary);
    font-size: 2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

h1 img{
    width: auto;
    height: 40px;
}

.nav-tabs {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
}

.nav-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-gray);
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--primary);
}

.nav-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-title {
    font-size: 14px;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.card-value.positive {
    color: var(--success);
}

.card-value.negative {
    color: var(--danger);
}

.card-label {
    font-size: 12px;
    color: var(--text-gray);
}

.section {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-light);
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-gray);
}

tbody tr:hover {
    background: var(--bg-light);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 22px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-gray);
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-dark);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-gray);
    transition: color 0.3s;
}

.icon-btn:hover {
    color: var(--primary);
}

.icon-btn.delete:hover {
    color: var(--danger);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 8px;
    }
}

.import-export-btns {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.month-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-light);
    padding: 10px;
    border-radius: 8px;
}

.month-selector select {
    width: auto;
    min-width: 150px;
}