﻿:root {
    --navajo-white: #FFDEAD;
    --navajo-white-light: #FFF8DC;
    --navajo-white-dark: #E6C9A8;
    --primary-color: #5D4037;
    --secondary-color: #8D6E63;
    --text-color: #3E2723;
    --surface-color: #FFFFFF;
    --success-color: #388E3C;
    --warning-color: #F57C00;
    --error-color: #D32F2F;
    --info-color: #1976D2;
    --shadow: 0 1px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 2px 8px rgba(0,0,0,0.15);
    --debit-color: #C62828;
    --credit-color: #2E7D32;
    --balance-color: #1565C0;
}
.material-theme {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--navajo-white-light) 0%, var(--navajo-white) 100%);
    min-height: 100vh;
    color: var(--text-color);
}
.page-container {
    width: clamp(800px, 96%, 1400px);
    margin: 0 auto;
    padding: 8px 08px;
    box-sizing: border-box;
}

.page-header {
    background: var(--surface-color);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--primary-color);
}

.header-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 400;
    line-height: 1.2;
}
.filter-card {
    background: var(--surface-color);
    border-radius: 6px;
    padding: 6px 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--navajo-white-dark);
    margin-bottom: 12px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto auto;
    gap: 12px;
    align-items: end;
}
.form-group {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.form-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--navajo-white-dark);
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    background: var(--surface-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
    height: 34px;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(93, 64, 55, 0.1);
}

.action-button {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-family: 'Roboto', sans-serif;
    line-height: 1.2;
    height: 34px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: var(--shadow-hover);
    }

    .btn-primary:disabled {
        background: var(--navajo-white-dark);
        color: var(--secondary-color);
        cursor: not-allowed;
        transform: none;
    }
.btn-secondary {
    background: var(--surface-color);
    color: var(--info-color);
    border: 1px solid var(--info-color);
}

    .btn-secondary:hover {
        background: var(--info-color);
        color: white;
    }
.btn-success {
    background: var(--success-color);
    color: white;
    border: 1px solid var(--success-color);
}

    .btn-success:hover {
        background: #2E7D32;
        color: white;
    }

.btn-back {
    background: var(--surface-color);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

    .btn-back:hover {
        background: var(--secondary-color);
        color: white;
    }
.btn-print {
    background: var(--surface-color);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    padding: 4px 12px;
    font-size: 0.75rem;
    height: 28px;
}

    .btn-print:hover {
        background: var(--warning-color);
        color: white;
    }
.report-card {
    background: var(--surface-color);
    border-radius: 6px;
    padding: 6px 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--navajo-white-dark);
    margin-bottom: 12px;
    position: relative;
}
.status-message {
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    line-height: 1.2;
}

.status-info {
    background: #E3F2FD;
    color: var(--info-color);
    border: 1px solid var(--info-color);
}
.status-warning {
    background: #FFF3E0;
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}
.status-error {
    background: #FFEBEE;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.status-success {
    background: #E8F5E8;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}
.text-center {
    text-align: center !important;
}

.text-end {
    text-align: right !important;
}

.text-start {
    text-align: left !important;
}
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-color);
}

    .no-data .material-icons {
        font-size: 48px;
        margin-bottom: 12px;
        opacity: 0.5;
    }
.required-field::after {
    content: " *";
    color: var(--error-color);
}
.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--navajo-white-dark) 50%, transparent 100%);
    margin: 24px 0;
}
.debit-amount {
    color: var(--debit-color);
    font-weight: 600;
}

.credit-amount {
    color: var(--credit-color);
    font-weight: 600;
}
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: var(--navajo-white-light);
    border-radius: 4px;
    border: 1px solid var(--navajo-white-dark);
}
.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--navajo-white-dark);
    border-radius: 3px;
    max-height: 100px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-hover);
    margin-top: 1px;
}

.suggestion-item {
    padding: 5px 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--navajo-white-light);
    font-size: 0.8rem;
    line-height: 1.2;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: var(--navajo-white-light);
    color: var(--primary-color);
    font-weight: 500;
}

    .suggestion-item:last-child {
        border-bottom: none;
    }

.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.preview-window {
    width: 90%;
    max-width: 900px;
    height: 90vh;
    background: #333;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
}

.preview-header {
    background: #212121;
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-paper-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    justify-content: center;
    background: #525659;
}

.a4-paper {
    background: white;
    width: 210mm; /* A4 Width */
    min-height: 297mm;
    padding: 20mm;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    color: black;
}
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    z-index: 1000;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--navajo-white-dark);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}