:root {
    --noella-primary: #2d6a4f;
    --noella-primary-dark: #1b4332;
    --noella-accent: #95d5b2;
    --noella-bg: #f8faf9;
    --noella-card: #ffffff;
    --noella-text: #1a1a2e;
    --noella-muted: #6c757d;
    --noella-success: #40916c;
    --noella-danger: #d00000;
    --noella-warning: #e9c46a;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--noella-bg);
    color: var(--noella-text);
    min-height: 100vh;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--noella-primary-dark) 0%, var(--noella-primary) 50%, #52b788 100%);
    padding: 1rem;
}

.login-card {
    background: var(--noella-card);
    border-radius: 1.25rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: var(--noella-primary);
    color: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.brand-icon-wide {
    width: auto;
    min-width: 28px;
    padding: 0 6px;
    font-size: 0.65rem;
    font-weight: 700;
}

.login-logo-wide {
    width: auto;
    min-width: 64px;
    height: 64px;
    padding: 0 14px;
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--noella-primary);
    color: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Navbar */
.noella-nav {
    background: var(--noella-primary-dark) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    margin-right: 4px;
}

.navbar-nav .nav-link.active {
    font-weight: 600;
    color: var(--noella-accent) !important;
}

/* Cards & stats */
.stat-card {
    background: var(--noella-card);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    height: 100%;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--noella-muted);
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.stat-card.stat-balance .stat-value { color: var(--noella-primary); }
.stat-card.stat-income .stat-value { color: var(--noella-success); }
.stat-card.stat-spent .stat-value { color: var(--noella-danger); }
.stat-card.stat-profit .stat-value { color: var(--noella-primary-dark); }

.content-card {
    background: var(--noella-card);
    border-radius: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Tables */
.table-noella {
    font-size: 0.9rem;
}

.table-noella th {
    font-weight: 600;
    color: var(--noella-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-width: 1px;
}

.table-noella td {
    vertical-align: middle;
}

/* Badges */
.badge-deposit { background: #40916c; }
.badge-purchase { background: #e76f51; }
.badge-sale { background: #2d6a4f; }
.badge-expense { background: #6c757d; }

/* Forms */
.btn-noella {
    background: var(--noella-primary);
    border-color: var(--noella-primary);
    color: white;
    font-weight: 600;
}

.btn-noella:hover {
    background: var(--noella-primary-dark);
    border-color: var(--noella-primary-dark);
    color: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--noella-accent);
    box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.2);
}

/* Receipt thumbnails */
.receipt-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.product-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

/* Activity list */
.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.activity-icon.deposit { background: #d8f3dc; }
.activity-icon.purchase { background: #ffe5d9; }
.activity-icon.sale { background: #b7e4c7; }
.activity-icon.expense { background: #e9ecef; }

/* Report summary */
.report-highlight {
    background: linear-gradient(135deg, var(--noella-primary-dark), var(--noella-primary));
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.report-highlight .big-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.report-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.report-row:last-child {
    border-bottom: none;
}

/* Install page */
.install-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--noella-bg);
    padding: 1rem;
}

/* Modal image preview */
.modal-receipt-img {
    max-width: 100%;
    border-radius: 8px;
}

@media (max-width: 576px) {
    .stat-card .stat-value {
        font-size: 1.25rem;
    }
    .login-card {
        padding: 1.5rem;
    }
}
