/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-color: #2E7D32;
    --secondary-color: #1976D2;
    --accent-color: #FF9800;
    --danger-color: #D32F2F;
    --warning-color: #FFA000;
    --success-color: #388E3C;
    --dark-color: #2C3E50;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --sidebar-color: #1A237E;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

body {
    background-color: #f5f7fa;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Login Screen */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1A237E 0%, #283593 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 500px;
    padding: 40px;
    text-align: center;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-header p {
    color: var(--gray-color);
    margin-bottom: 30px;
    font-size: 16px;
}

.login-body input {
    width: 100%;
    padding: 18px;
    margin-bottom: 25px;
    border: 2px solid #e1e5eb;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.login-body input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

#loginBtn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary-color), #4CAF50);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

#loginBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

.error-message {
    color: var(--danger-color);
    margin-top: 15px;
    font-size: 14px;
    min-height: 20px;
}

.hint {
    margin-top: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.hint p {
    color: var(--gray-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: var(--gray-color);
    font-size: 14px;
}

.login-footer p:first-child {
    margin-bottom: 8px;
    font-weight: 500;
}

/* Dashboard Container */
.dashboard-container {
    display: none;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, var(--sidebar-color), #303F9F);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-top: 5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.capital-display {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.capital-display i {
    font-size: 18px;
    color: #FFD700;
}

.capital-btn, .download-btn, .logout-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.capital-btn {
    background: linear-gradient(135deg, #FF9800, #FFB300);
}

.capital-btn:hover {
    background: linear-gradient(135deg, #F57C00, #FFA000);
    transform: translateY(-2px);
}

.download-btn {
    background: linear-gradient(135deg, var(--primary-color), #4CAF50);
}

.download-btn:hover {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    transform: translateY(-2px);
}

.logout-btn {
    background: var(--danger-color);
}

.logout-btn:hover {
    background: #B71C1C;
    transform: translateY(-2px);
}

.current-date {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* Dashboard Content */
.dashboard-content {
    display: flex;
    min-height: calc(100vh - 100px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-color);
    color: white;
    padding: 25px 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.business-info {
    padding: 0 25px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.business-info h3 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFD700;
}

.stats-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.stat-value {
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.nav-menu {
    list-style: none;
    flex: 1;
    padding: 25px 0;
}

.nav-menu li {
    padding: 15px 25px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid transparent;
    margin-bottom: 5px;
}

.nav-menu li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu li.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--accent-color);
    font-weight: 500;
    color: white;
}

.nav-menu li i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.sidebar-footer {
    padding: 25px 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.sidebar-footer h4 {
    color: #FFD700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    background: #f5f7fa;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    color: var(--dark-color);
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--gray-color);
    font-size: 15px;
}

/* Overview Section */
.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.overview-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.overview-card.profit::before { background: linear-gradient(90deg, #4CAF50, #2E7D32); }
.overview-card.loans::before { background: linear-gradient(90deg, #2196F3, #1976D2); }
.overview-card.customers::before { background: linear-gradient(90deg, #FF9800, #F57C00); }
.overview-card.overdue::before { background: linear-gradient(90deg, #F44336, #D32F2F); }

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: white;
}

.profit .card-icon { background: linear-gradient(135deg, #4CAF50, #2E7D32); }
.loans .card-icon { background: linear-gradient(135deg, #2196F3, #1976D2); }
.customers .card-icon { background: linear-gradient(135deg, #FF9800, #F57C00); }
.overdue .card-icon { background: linear-gradient(135deg, #F44336, #D32F2F); }

.overview-card h3 {
    color: var(--gray-color);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.card-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.card-change {
    font-size: 14px;
    color: var(--gray-color);
}

.card-change span {
    font-weight: 600;
    color: var(--dark-color);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.chart-container h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.quick-actions h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    padding: 18px;
    background: #f8f9fa;
    border: 2px solid #e1e5eb;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--dark-color);
    font-size: 15px;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Loan Management Section */
.loan-management {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .loan-management {
        grid-template-columns: 1fr;
    }
}

.form-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.form-card h3 {
    margin-bottom: 25px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e5eb;
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.loan-calculator {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
    border: 2px solid #e1e5eb;
}

.loan-calculator h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.calculator-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-result {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e1e5eb;
}

.calc-result:last-child {
    border-bottom: none;
}

.calc-result.total {
    font-weight: 700;
    font-size: 16px;
    color: var(--primary-color);
    border-top: 2px solid var(--primary-color);
    padding-top: 15px;
    margin-top: 5px;
}

.btn-primary {
    padding: 14px 25px;
    background: linear-gradient(135deg, var(--primary-color), #4CAF50);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

/* Loans List Section */
.loans-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 25px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.loans-filter h3 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-options select {
    padding: 10px 15px;
    border: 1px solid #e1e5eb;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.loans-table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 25px;
}

.loans-table {
    width: 100%;
    border-collapse: collapse;
}

.loans-table th {
    background: #f8f9fa;
    padding: 18px 15px;
    text-align: left;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #e1e5eb;
}

.loans-table td {
    padding: 15px;
    border-bottom: 1px solid #e1e5eb;
    color: var(--dark-color);
    font-size: 14px;
}

.loans-table tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-active { background: #e8f5e9; color: var(--success-color); }
.status-overdue { background: #ffebee; color: var(--danger-color); }
.status-paid { background: #e3f2fd; color: var(--secondary-color); }

.action-cell {
    display: flex;
    gap: 10px;
}

.action-cell button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-cell .pay-btn {
    background: var(--success-color);
    color: white;
}

.action-cell .edit-btn {
    background: var(--secondary-color);
    color: white;
}

.action-cell .delete-btn {
    background: var(--danger-color);
    color: white;
}

.loans-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.summary-card h4 {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.summary-card p {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
}

/* Customer Management */
.customers-management {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .customers-management {
        grid-template-columns: 1fr;
    }
}

.customers-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 25px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.customers-filter input {
    padding: 10px 15px;
    border: 1px solid #e1e5eb;
    border-radius: var(--border-radius);
    font-size: 14px;
    width: 250px;
}

.customers-table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 25px;
    max-height: 500px;
    overflow-y: auto;
}

.customer-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #4CAF50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 20px;
}

.stat-card h4 {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-card p {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-color);
}

/* Transaction Management */
.transactions-management {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .transactions-management {
        grid-template-columns: 1fr;
    }
}

.transactions-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 25px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.transaction-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.positive { color: var(--success-color); font-weight: 600; }
.negative { color: var(--danger-color); font-weight: 600; }

/* Journals Section */
.journals-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.journal-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5eb;
}

.journal-tab {
    padding: 18px 30px;
    background: none;
    border: none;
    border-right: 1px solid #e1e5eb;
    font-weight: 500;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.journal-tab:hover {
    background: #e9ecef;
    color: var(--dark-color);
}

.journal-tab.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.journal-content {
    padding: 25px;
}

.journal-section {
    display: none;
}

.journal-section.active {
    display: block;
}

.journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e5eb;
}

.journal-header h3 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.journal-actions {
    display: flex;
    gap: 15px;
}

.journal-table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.journal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.journal-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    color: var(--dark-color);
    font-weight: 600;
    border-bottom: 2px solid #e1e5eb;
    position: sticky;
    top: 0;
}

.journal-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e5eb;
    color: var(--dark-color);
}

.journal-table tfoot {
    background: #f8f9fa;
    font-weight: 600;
}

/* Analytics Section */
.analytics-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.analytics-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.chart-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.chart-card h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytics-reports {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.analytics-reports h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.report-card {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    border: 2px solid #e1e5eb;
}

.report-card h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 16px;
}

.report-stats {
    margin-top: 15px;
}

.report-stats p {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e1e5eb;
    color: var(--gray-color);
    font-size: 14px;
}

.report-stats p:last-child {
    border-bottom: none;
}

.report-stats span {
    color: var(--dark-color);
    font-weight: 600;
}

.analytics-summary {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.analytics-summary h3 {
    margin-bottom: 25px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.kpi-card {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.kpi-card h4 {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.kpi-change {
    font-size: 12px;
    color: var(--gray-color);
}

.kpi-change.positive {
    color: var(--success-color);
}

/* Settings Section */
.settings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.settings-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.settings-card h3 {
    margin-bottom: 25px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-help {
    font-size: 12px;
    color: var(--gray-color);
    margin-top: 5px;
}

.capital-management {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.current-capital h4 {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.capital-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.add-capital-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.document-settings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.data-management {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.backup-section, .reset-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.backup-section h4, .reset-section h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.data-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.btn-danger {
    padding: 12px 20px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-danger:hover {
    background: #B71C1C;
    transform: translateY(-2px);
}

.data-info {
    font-size: 13px;
    color: var(--gray-color);
    padding: 15px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

/* Footer */
.dashboard-footer {
    background: var(--dark-color);
    color: white;
    padding: 20px 30px;
    text-align: center;
    font-size: 14px;
}

.dashboard-footer p:first-child {
    margin-bottom: 8px;
    font-weight: 500;
}

.dashboard-footer p:last-child {
    color: rgba(255, 255, 255, 0.7);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.receipt-modal {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px 0;
    }
    
    .nav-menu {
        display: flex;
        overflow-x: auto;
        padding: 15px;
    }
    
    .nav-menu li {
        white-space: nowrap;
        padding: 10px 20px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-menu li.active {
        border-left: none;
        border-bottom-color: var(--accent-color);
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .overview-cards,
    .charts-row,
    .action-buttons,
    .analytics-charts,
    .report-cards,
    .kpi-grid,
    .settings-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .capital-display {
        order: -1;
        width: 100%;
        justify-content: center;
    }
    
    .filter-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-options input,
    .filter-options select {
        width: 100%;
    }
    
    .journal-tabs {
        flex-direction: column;
    }
    
    .journal-tab {
        border-right: none;
        border-bottom: 1px solid #e1e5eb;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .card-value {
        font-size: 28px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Receipt Styling for PDF */
.receipt-content {
    font-family: 'Roboto Mono', monospace;
    padding: 30px;
    background: white;
    border: 2px solid #333;
}

.receipt-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
}

.receipt-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 24px;
}

.receipt-details {
    margin-bottom: 30px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.receipt-total {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    border-top: 2px solid #333;
    padding-top: 15px;
}

.receipt-footer {
    margin-top: 40px;
    text-align: center;
    color: var(--gray-color);
    font-size: 12px;
}