
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%); min-height: 100vh; padding: 15px; }
.container { max-width: 1200px; margin: 5px auto; background: white; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
.header { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%); color: white; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.header h2 { font-size: 18px; }
.btn-back { background: rgba(255,255,255,0.2); color: white; border: 2px solid white; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; text-decoration: none; }
.content { padding: 15px 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); padding: 15px; border-radius: 10px; border-left: 4px solid #ff6b6b; }
.stat-card.warning { border-left-color: #ffc107; }
.stat-card.success { border-left-color: #28a745; }
.card-title { font-size: 12px; color: #666; margin-bottom: 8px; }
.card-value { font-size: 22px; font-weight: 700; color: #333; }
.actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.btn { padding: 10px 20px; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block; }
.btn-primary { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%); color: white; }
.btn-secondary { background: #6c757d; color: white; }
.search-bar { width: 100%; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 15px; margin-bottom: 15px; }
.tabs { display: flex; gap: 5px; margin-bottom: 20px; border-bottom: 2px solid #e0e0e0; }
.tab { padding: 10px 20px; background: none; border: none; cursor: pointer; font-weight: 600; color: #666; border-bottom: 3px solid transparent; }
.tab.active { color: #ff6b6b; border-bottom-color: #ff6b6b; }
.loans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; padding: 15px; }
.loan-item { background: white; padding: 20px; border-radius: 12px; border: 2px solid #e0e0e0; box-shadow: 0 2px 8px rgba(0,0,0,0.08); cursor: pointer; transition: all 0.3s; }
.loan-item:hover { border-color: #ff6b6b; box-shadow: 0 8px 20px rgba(255,107,107,0.25); transform: translateY(-3px); }
.loan-item.late { background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%); border-color: #dc3545; }
.loan-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.loan-client { font-size: 18px; font-weight: 700; color: #333; }
.loan-status { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.status-active { background: #d4edda; color: #155724; }
.status-late { background: #f8d7da; color: #721c24; }
.status-finished { background: #d1ecf1; color: #0c5460; }
.status-archived { background: #e2e3e5; color: #383d41; }
.loan-details { font-size: 16px; color: #666; margin-bottom: 12px; }
.progress-bar { width: 100%; height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #ff6b6b 0%, #ee5a6f 100%); }
.progress-text { font-size: 12px; color: #999; margin-bottom: 10px; }
.loan-next { display: flex; justify-content: space-between; background: #fff3cd; padding: 8px; border-radius: 6px; font-size: 13px; }
.next-payment { font-weight: 600; color: #856404; }
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 15px; z-index: 9999; font-size: 18px; color: #ff6b6b; font-weight: 600; }

/* Dark Mode */
body.dark-mode { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
body.dark-mode .container { background: #0f0f23; color: #e0e0e0; }
body.dark-mode .header { }
body.dark-mode .content { color: #e0e0e0; }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea { background: #16213e; color: #e0e0e0; border-color: #333; }
body.dark-mode .card-item, body.dark-mode .summary-card { border-color: #333; }

@media (max-width: 600px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .cards-grid { grid-template-columns: 1fr !important; }
    .header { flex-direction: column; text-align: center; gap: 8px; }
}

