/* Modern Design Variables */
:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --secondary-color: #2c3e50;
    --accent-color: #27ae60;
    --danger-color: #e74c3c;
    --background-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-light: #7f8c8d;
    --border-color: #e1e4e8;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
    --font-family: 'Poppins', sans-serif;
    --radius: 12px;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.logo-area h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
    letter-spacing: -0.5px;
}

.logo-area h2 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
    margin: 5px 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Layout */
.content-wrapper {
    flex: 1;
    /* Pushes footer down */
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.card-header .icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

.card-body {
    padding: 25px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-col {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: var(--font-family);
}

input:focus,
select:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

input[readonly] {
    background-color: #eef2f7;
    border-style: dashed;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(74, 144, 226, 0.4);
}

.btn-success {
    background-color: var(--accent-color);
    color: white;
}

.btn-success:hover {
    background-color: #219150;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
    margin-left: 5px;
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.btn-icon {
    margin-right: 8px;
}

.form-actions {
    text-align: right;
    margin-top: 10px;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background-color: #f8f9fa;
    color: var(--text-light);
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background-color: #fafbfc;
}

.date-badge {
    background-color: #eef2f7;
    color: var(--secondary-color);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.amount-cell {
    font-weight: 600;
    color: var(--secondary-color);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
    font-style: italic;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

.main-footer strong {
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(44, 62, 80, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    width: 90%;
    max-width: 450px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.modal-body {
    padding: 25px;
}

.close {
    color: var(--text-light);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: var(--danger-color);
}

.summary-box {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-row span {
    color: var(--text-light);
}

.summary-row strong {
    color: var(--secondary-color);
}

/* Custom Checkbox */
.checkbox-group {
    margin-top: 15px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.custom-checkbox input {
    display: none;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: background-color 0.2s;
}

.custom-checkbox:hover .checkmark {
    background-color: #ccc;
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

/* Print Layout Styles (Unchanged functionality) */
@media print {
    @page {
        size: auto;
        margin: 0;
    }

    body {
        background: #fff;
    }

    .no-print,
    .app-container {
        display: none;
    }

    /* Hide app container in print */
}

/* Cheque Attributes (Copied from previous functionality) */
.cheque-leaf {
    width: 20.32cm;
    height: 9.3cm;
    position: relative;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #000;
}

.cheque-field {
    position: absolute;
    white-space: nowrap;
}

.date-box {
    top: 0.8cm;
    right: 1.5cm;
    letter-spacing: 5px;
    font-weight: bold;
}

.payee-name {
    top: 2.2cm;
    left: 2.5cm;
    font-weight: bold;
    text-transform: uppercase;
}

.amount-words-1 {
    top: 3.2cm;
    left: 2.5cm;
    width: 15cm;
    line-height: 1.5;
}

.amount-box {
    top: 3.5cm;
    right: 1.5cm;
    font-weight: bold;
    font-size: 16px;
}

.ac-payee {
    top: 0.5cm;
    left: 0.5cm;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 2px;
    transform: rotate(-15deg);
    font-weight: bold;
}

/* Bank Specifics */
.sbi .date-box {
    top: 6mm;
    right: 12mm;
}

.sbi .payee-name {
    top: 18mm;
    left: 18mm;
}

.sbi .amount-words-1 {
    top: 28mm;
    left: 20mm;
}

.sbi .amount-box {
    top: 32mm;
    right: 10mm;
}

.pnb .date-box {
    top: 7mm;
    right: 10mm;
}

.pnb .payee-name {
    top: 20mm;
    left: 20mm;
}

.pnb .amount-words-1 {
    top: 30mm;
    left: 22mm;
}

.pnb .amount-box {
    top: 35mm;
    right: 8mm;
}

.hdfc .date-box {
    top: 5mm;
    right: 10mm;
}

.hdfc .payee-name {
    top: 15mm;
    left: 15mm;
}

.hdfc .amount-words-1 {
    top: 25mm;
    left: 18mm;
}

.hdfc .amount-box {
    top: 30mm;
    right: 12mm;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.custom-radio {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
}

.custom-radio input {
    display: none;
}

.radio-mark {
    height: 18px;
    width: 18px;
    background-color: #eee;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    border: 1px solid #ccc;
}

.custom-radio:hover .radio-mark {
    background-color: #e0e0e0;
}

.custom-radio input:checked~.radio-mark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.custom-radio input:checked~.radio-mark:after {
    content: "";
    position: absolute;
    display: block;
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.checkbox-group-col {
    display: flex;
    align-items: flex-end;
    padding-bottom: 5px;
}

/* Wrapper class updates */
.print-wrapper {
    position: relative;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}