:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --primary-color: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --positive: #10b981;
    --negative: #ef4444;
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
}

.app-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, rgba(15,23,42,1) 0%, rgba(30,41,59,1) 100%);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.2rem;
}

.logo h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

nav ul {
    list-style: none;
    flex-grow: 1;
}

nav ul li {
    margin-bottom: 0.5rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

nav ul li.active a,
nav ul li a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.user-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: #475569;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info .name {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-info .role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.main-content {
    flex: 1;
    padding: 2.5rem;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 40%);
}

header {
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.glass {
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.overview-cards h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.positive { color: var(--positive); }
.negative { color: var(--negative); }

.trend {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
}
.trend.up { background: rgba(16, 185, 129, 0.1); color: var(--positive); }
.trend.down { background: rgba(239, 68, 68, 0.1); color: var(--negative); }

.recent-transactions h2 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    transition: background-color 0.2s;
}

.transaction-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.t-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.t-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.bg-grocery { background: rgba(59, 130, 246, 0.15); }
.bg-income { background: rgba(16, 185, 129, 0.15); }

.t-info h4 {
    font-size: 1rem;
    font-weight: 600;
}

.t-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.t-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Modals and Forms */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: translateY(-20px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.4rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--text-main);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-primary:active {
    transform: scale(0.98);
}

.w-100 {
    width: 100%;
    margin-top: 1rem;
    padding: 12px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background-color: rgba(15, 23, 42, 0.5);
    color: var(--text-main);
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.type-toggle {
    display: flex;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-main);
}
