/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 56px 0 0;
    box-shadow: inset -1px 0 0 rgba(0,0,0,.1);
    width: 220px;
    background-color: #212529;
}
.sidebar .nav-link {
    font-weight: 500;
    color: #adb5bd;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
}
.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.05);
}
.sidebar .nav-link.active {
    color: #fff;
    border-left-color: #0d6efd;
    background-color: rgba(13,110,253,0.1);
}
.sidebar .nav-link i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}
.main-content {
    margin-left: 220px;
    padding: 1.5rem;
}
@media (max-width: 767.98px) {
    .main-content { margin-left: 0; }
}

/* KPI Cards */
.kpi-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.15s;
}
.kpi-card:hover { transform: translateY(-2px); }
.kpi-card .kpi-value { font-size: 1.75rem; font-weight: 700; }
.kpi-card .kpi-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }

/* Project Cards */
.project-card {
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    border: 1px solid rgba(0,0,0,0.1);
}
.project-card:hover { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.project-card .card-img-top { height: 160px; object-fit: cover; }
.project-card .card-img-placeholder {
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 3rem;
}

/* Balance Card */
.balance-card {
    border-radius: 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 2rem;
}
.balance-amount { font-size: 2.5rem; font-weight: 800; }
.balance-positive { color: #2ecc71; }
.balance-negative { color: #e74c3c; }

/* Login Page */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex; align-items: center; justify-content: center;
}
.login-card {
    border-radius: 16px;
    padding: 2.5rem;
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 420px;
    width: 100%;
    margin: 1rem;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 56px; height: 56px;
    border-radius: 50%;
    font-size: 24px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    border: none;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.photo-grid img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 8px; cursor: pointer; transition: opacity 0.2s;
}
.photo-grid img:hover { opacity: 0.85; }

/* Upload Zone */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem; text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    color: #6c757d;
}
.upload-zone:hover { border-color: #0d6efd; background: rgba(13,110,253,0.05); }

/* Receipt Preview */
.receipt-preview {
    max-width: 200px; max-height: 200px; object-fit: contain;
    border-radius: 8px; border: 1px solid #dee2e6;
}

/* Progress bar */
.rehab-progress { height: 8px; border-radius: 4px; }

/* Toast */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 1100; }

/* Table money */
.table-money { text-align: right; font-family: 'Courier New', monospace; font-weight: 600; }

/* Lightbox */
.lightbox-img { max-width: 100%; max-height: 80vh; object-fit: contain; }

/* Responsive */
@media (max-width: 575.98px) {
    .balance-amount { font-size: 1.8rem; }
    .kpi-card .kpi-value { font-size: 1.3rem; }
    .project-card .card-img-placeholder { height: 120px; }
}

@media print {
    .sidebar, .navbar, .fab, .btn, .no-print { display: none !important; }
    .main-content { margin-left: 0; }
}
