:root {
    --sidebar-width: 260px;
    --bg-color: #f5f5f7; /* Apple System Gray 6 */
    --card-bg: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --sidebar-bg: rgba(255, 255, 255, 0.75); /* Translucent */
    --accent: #0071e3; /* Apple Blue */
    --danger: #ff3b30;
    --success: #34c759;
    --warning: #ff9500;
    --card-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- SIDEBAR (Glassmorphism) --- */
.sidebar {
    width: var(--sidebar-width); height: 100vh; position: fixed; top: 0; left: 0;
    background: var(--sidebar-bg); 
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0,0,0,0.05); padding: 40px 20px;
    display: flex; flex-direction: column; z-index: 1000;
}

.brand { display: flex; align-items: center; gap: 15px; margin-bottom: 50px; padding-left: 10px; }
.brand-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.brand-text { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.5px; color: #000; }

.nav-item {
    padding: 12px 15px; margin-bottom: 6px; border-radius: 12px; cursor: pointer;
    color: var(--text-secondary); font-weight: 500; display: flex; align-items: center; gap: 14px;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.nav-item:hover { background: rgba(0,0,0,0.03); color: var(--text-primary); }
.nav-item.active { background: #fff; color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.06); font-weight: 600; }
.nav-item i { width: 20px; text-align: center; }

/* --- MAIN CONTENT --- */
.main-content { margin-left: var(--sidebar-width); padding: 50px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 35px; }
.page-title { font-size: 2.2rem; font-weight: 700; letter-spacing: -1px; }

/* --- CARDS (Apple Style) --- */
.apple-card {
    background: var(--card-bg); border-radius: 20px; padding: 28px;
    box-shadow: var(--card-shadow); border: none;
    height: 100%; transition: transform 0.2s ease;
}

.stat-val { font-size: 2.2rem; font-weight: 700; letter-spacing: -1px; margin-top: 5px; color: #111; }
.stat-lbl { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; color: var(--text-secondary); }

/* --- FINANCE ROWS --- */
.row-income { background-color: #f0fdf4 !important; color: #15803d; }
.row-expense { background-color: #fef2f2 !important; color: #b91c1c; }
.row-pending { background-color: #fff !important; color: #64748b; }

/* --- BUTTONS --- */
.btn-apple { 
    background: #111; color: #fff; border-radius: 14px; padding: 10px 20px; border: none; font-weight: 500; 
    transition: transform 0.1s;
}
.btn-apple:hover { background: #000; transform: scale(1.02); color: #fff; }

.btn-apple-sec { 
    background: rgba(0,0,0,0.05); color: #111; border-radius: 14px; padding: 10px 20px; border: none; font-weight: 500;
}
.btn-apple-sec:hover { background: rgba(0,0,0,0.1); }

/* --- INPUTS --- */
.form-control, .form-select {
    border-radius: 12px; padding: 12px; border: 1px solid #e5e5ea; background: #f2f2f7; font-size: 0.95rem;
}
.form-control:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,0.15); }

/* --- TABLES --- */
.table-custom th { font-weight: 600; color: var(--text-secondary); font-size: 0.8rem; border-bottom: 1px solid #e5e5ea; padding-bottom: 15px; }
.table-custom td { vertical-align: middle; border-bottom: 1px solid #f5f5f7; padding: 15px 5px; }
.table-custom tr:last-child td { border-bottom: none; }

/* --- ALERTS --- */
.alert-apple { background: rgba(255,59,48,0.08); border-radius: 16px; color: var(--danger); padding: 15px 20px; display:flex; align-items:center; gap:15px; margin-bottom:20px; }
