/* --- ЗМІННІ --- */
:root {
    --bg-page: #121212;
    --bg-dashboard: #1E1A17;
    --bg-card: #29221D;
    --accent-orange: #FF6B00;

    /* М'який кремово-білий замість сліпучого чисто-білого */
    --text-white: #EAE6E3;
    --text-muted: #BDBABB;
    --text-dark-gray: #7A7571;

    --text-green: #00FF66;
    --text-red: #FF3B30;
}

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

body {
    /* Страховка для символу Найри (sans-serif в кінці) */
    font-family: 'Bai Jamjuree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-white);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dashboard-container {
    background-color: var(--bg-dashboard);
    width: 100%;
    max-width: 1300px;
    height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 240px 1fr;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* --- САЙДБАР --- */
.sidebar {
    background-color: var(--bg-card);
    padding: 30px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    padding-left: 10px;
}

.profile-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    font-size: 16px;
    font-weight: 500;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.nav-link:hover .nav-icon {
    opacity: 1;
}

.nav-item.active .nav-link {
    background-color: var(--accent-orange);
    color: var(--text-white);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.25);
}

.nav-item.active .nav-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* --- ГОЛОВНА ЧАСТИНА --- */
.main-content {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ШАПКА */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: 0.3s;
}

.icon-btn img {
    width: 20px;
    opacity: 0.7;
    transition: 0.3s;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.icon-btn:hover img {
    opacity: 1;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 6px;
    height: 6px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    border: 2px solid var(--bg-dashboard);
}

/* СІТКА КАРТОК */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 20px;
    overflow-y: auto;
    padding-right: 10px;
    padding-bottom: 20px;
}

.cards-grid::-webkit-scrollbar {
    width: 6px;
}

.cards-grid::-webkit-scrollbar-thumb {
    background-color: #3a3633;
    border-radius: 10px;
}

.card {
    background-color: var(--bg-card);
    border-radius: 9.48px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.item-budget {
    grid-row: span 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.add-icon {
    width: 14px;
    opacity: 0.6;
    cursor: pointer;
    transition: 0.3s;
}

.add-icon:hover {
    opacity: 1;
}

/* --- ВНУТРІШНІЙ КОНТЕНТ КАРТОК --- */

/* 1. Bank Card */
.bank-card {
    background: radial-gradient(circle at 100% 100%, rgba(255, 107, 0, 0.3) 0%, transparent 60%), linear-gradient(135deg, #3a2e25 0%, #1a1613 100%);
    border-radius: 9.48px;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bc-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.bc-balance {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
}

.bc-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.bc-number {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.bc-expiry {
    font-size: 9px;
    color: var(--text-muted);
}

.bc-expiry span {
    color: var(--text-white);
    font-weight: 600;
    margin-left: 4px;
}

.bc-logo {
    width: 30px;
}

/* 2. Lists (Transactions, Subscriptions) */
.list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.sub-icon {
    width: 32px;
}

.item-text h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.item-text p {
    font-size: 11px;
    color: var(--text-dark-gray);
    margin-top: 3px;
}

.due {
    color: var(--text-dark-gray);
    font-size: 10px;
    font-weight: 400;
    margin-left: 5px;
}

/* Цифри тепер спокійного сірого кольору (як на макеті) */
.amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.text-red {
    color: var(--text-red);
}

.text-green {
    color: var(--text-green);
}

.text-white {
    color: var(--text-white);
}

/* Для великих сум */

/* 3. Report Chart (Осі та графік без дублів) */
.report-container {
    display: flex;
    gap: 10px;
    flex: 1;
    align-items: stretch;
}

.y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 25px;
    font-size: 9px;
    color: var(--text-dark-gray);
}

.chart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chart-img {
    width: 100%;
    object-fit: contain;
}

/* 4. Budget */
.budget-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.budget-top h2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-white);
}

.budget-total {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
}

.budget-list {
    gap: 18px;
}

.checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--text-dark-gray);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.checkbox.checked::after {
    content: '✓';
    color: var(--text-muted);
    font-size: 12px;
    font-weight: bold;
}

/* 6. Savings */
.savings-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.donut-chart {
    width: 80px;
}

.savings-info p {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.savings-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
}

.mt-10 {
    margin-top: 10px;
}

/* 7. Loans & Advice */
.mb-10 {
    margin-bottom: 15px;
}

.loan-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-dark-gray);
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    width: 65%;
    height: 100%;
    background-color: var(--accent-orange);
    border-radius: 3px;
}

.advice-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}