/* CSS variables for consistent premium branding */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(20, 26, 43, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --primary-glow: rgba(99, 102, 241, 0.4);
    
    --success: #10b981;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --success-glow: rgba(16, 185, 129, 0.3);
    
    --warning: #f59e0b;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --warning-glow: rgba(245, 158, 11, 0.3);
    
    --danger: #ef4444;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --danger-glow: rgba(239, 68, 68, 0.3);
    
    --info: #06b6d4;
    --info-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Layout container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition-smooth);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.brand-icon {
    width: 2rem;
    height: 2rem;
    color: #6366f1;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

.brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
    width: 100%;
}

.nav-item i {
    width: 1.25rem;
    height: 1.25rem;
    transition: var(--transition-smooth);
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.nav-item.active {
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-item.active i {
    transform: scale(1.1);
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem;
    cursor: not-allowed; /* Fixed in Dark Mode as requested */
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem 1.5rem 3rem;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(10, 14, 23, 0.5);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-title h1 {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.current-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.content-wrapper {
    padding: 2rem 3rem;
    flex-grow: 1;
}

/* Base Component: Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    outline: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 6px 18px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
    box-shadow: 0 4px 12px var(--danger-glow);
}

.btn-danger:hover {
    box-shadow: 0 6px 18px var(--danger-glow);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
    width: 100%;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0.5rem;
    transition: var(--transition-smooth);
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Tabs Toggle */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stat Cards Layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-glow);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    width: 1.75rem;
    height: 1.75rem;
}

.icon-capital {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.icon-profit {
    background: rgba(6, 182, 212, 0.15);
    color: var(--info);
}

.icon-collected {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.icon-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.stat-info h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 0.1rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dashboard Grid Layout (Charts + List) */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}

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

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* Chart Styles */
.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Due List Section */
.due-list-container {
    max-height: 400px;
}

.due-list {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-right: 0.25rem;
}

/* Custom Scrollbar for due list & modals */
.due-list::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.due-list::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.due-list::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.due-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.due-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateX(2px);
}

.due-client-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.due-client-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.due-meta {
    text-align: right;
}

.due-amount {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

/* Form Styles (New Loan Tab) */
.loan-form-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.form-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.full-width {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i,
.currency-symbol {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.currency-symbol {
    font-weight: 600;
    color: var(--text-secondary);
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem 0.85rem 2.5rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-glow);
    background: rgba(10, 14, 23, 0.95);
}

.input-wrapper select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Projection Card */
.projection-card {
    background: linear-gradient(135deg, rgba(20, 26, 43, 0.8) 0%, rgba(13, 17, 30, 0.9) 100%);
    border: 1px solid var(--border-color);
    justify-content: center;
}

.projection-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
}

.projection-result {
    text-align: center;
    margin-bottom: 2rem;
}

.proj-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.proj-value {
    font-size: 3rem;
    font-weight: 800;
    margin: 0.5rem 0;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 30%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15));
}

.proj-frequency-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.divider {
    border: 0;
    height: 1px;
    background: radial-gradient(circle, var(--border-color) 0%, transparent 100%);
    margin: 1.5rem 0;
}

.projection-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.proj-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.proj-row.highlight {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
}

.proj-row strong {
    color: var(--text-primary);
}

/* Toolbar & Filters (Loans list) */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-bar {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
    min-width: 250px;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--border-glow);
}

.filter-options {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    gap: 0.25rem;
}

.filter-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Loan Cards Grid */
.loans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.loan-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
}

.loan-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-glow);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.loan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.loan-card-client h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.loan-card-client span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.loan-card-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.loan-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.detail-item strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.loan-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.loan-next-payment {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.loan-next-payment strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Badges styling */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: rgba(6, 182, 212, 0.12);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Color classes utility */
.text-profit { color: var(--info); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-accent { color: #a855f7; }

/* Modal Box Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    z-index: 200;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: var(--transition-smooth);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-large {
    max-width: 850px;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Backup and Restore Utilities */
.backup-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.backup-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.backup-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.block-label {
    display: flex;
    width: 100%;
}

.danger-zone {
    border: 1px dashed rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background: rgba(239, 68, 68, 0.02);
}

.danger-zone h4 {
    color: var(--danger);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.danger-zone p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Loan Summary inside Modal */
.loan-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.summary-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.summary-item h4 {
    font-size: 1.15rem;
    font-weight: 700;
}

.summary-item h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Amortization Table Styles */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.amortization-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amortization-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.amortization-table tr:last-child td {
    border-bottom: none;
}

.amortization-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* Payment box modal */
.payment-info-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-info-box p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.payment-info-box strong {
    color: var(--text-primary);
}

/* Empty States */
.empty-state {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    gap: 1rem;
    width: 100%;
}

.empty-state i {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1rem;
    max-width: 300px;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .loan-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 1.5rem 0.5rem;
        align-items: center;
    }
    
    .brand h2,
    .nav-item span,
    .theme-toggle span {
        display: none;
    }
    
    .brand {
        justify-content: center;
        margin-bottom: 2rem;
    }
    
    .nav-item {
        justify-content: center;
        padding: 1rem;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .app-header {
        padding: 1.5rem 1.5rem;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
    
    .form-layout {
        grid-template-columns: 1fr;
    }
    
    .full-width {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .quick-actions {
        width: 100%;
    }
    
    .quick-actions button {
        width: 100%;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar {
        max-width: 100%;
    }
}
