:root {
    --primary-color: #025359;
    --secondary-color: #f0f2f5;
    --paper-bg: #ffffff;
    --text-dark: #333;
    --border-color: #ddd;
    --input-bg: #fdfdfd;
}


/* Header Tweaks - Moved to Refactored Section */

/* SPLIT LAYOUT CONTAINER */
.split-layout {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    align-items: flex-start; /* Align top for sticky left panel */
    flex: 1; 
    min-height: 0;
    /* overflow: hidden; Removed to allow page growth */
}

/* --- LEFT PANEL (Inputs) --- */
.left-panel {
    flex: 0 0 400px; /* Fixed width for controls */
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    
    /* Make sticky */
    position: sticky;
    top: 80px; /* Below fixed header */
    height: calc(100vh - 100px); /* Fit within viewport */
    
    overflow-y: auto;
    box-sizing: border-box; 
}

.panel-header h2 { margin-top: 0; color: var(--primary-color); }
.subtitle { color: #666; font-size: 0.9rem; margin-bottom: 1rem; }

/* Tabs inside Left Panel - Moved to Refactored Section */

/* Voice UI specific */
.voice-recorder-ui { text-align: center; }
.recorder-circle {
    margin: 2rem auto;
    position: relative;
    width: 100px;
}
.record-btn {
    width: 80px; 
    height: 80px; border-radius: 50%;
    background: var(--primary-color); color: white; border: none;
    font-size: 2rem; cursor: pointer; box-shadow: 0 4px 10px rgba(2, 83, 89, 0.4);
    transition: transform 0.2s;
}
.record-btn:hover { transform: scale(1.05); }
.record-btn.is-recording { background: #dc3545; animation: pulse 1.5s infinite; }
.recording-timer { margin-top: 10px; font-family: monospace; font-size: 1.2rem; }

/* Doc UI specific */
.dropzone {
    border: 2px dashed #ccc; padding: 2rem; text-align: center;
    border-radius: 8px; cursor: pointer; transition: 0.2s; display: block;
}
.dropzone:hover { border-color: var(--primary-color); background: #f0fdfd; }
.doc-type-selector { width: 100%; padding: 8px; margin-bottom: 10px; border-radius: 4px; border: 1px solid #ccc; }

/* --- RIGHT PANEL (Paper Form) --- */
.right-panel {
    flex: 1; /* Takes remaining space */
    display: flex;
    justify-content: center;
    /* Remove internal scroll - let page scroll handle it */
    height: auto; 
    overflow: visible;
    padding-bottom: 2rem;
}

.paper-form {
    background: white;
    width: 100%;
    max-width: 800px;
    padding: 3rem; /* Authentic paper padding */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1); /* Paper shadow */
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.bank-logo { font-size: 1.5rem; font-weight: bold; color: var(--primary-color); opacity: 0.8; }
.form-title h1 { margin: 0; font-size: 1.8rem; text-transform: uppercase; }
.form-title small { color: #666; }

.section-title {
    background: #f0f2f5;
    padding: 5px 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #444;
    border-left: 4px solid var(--primary-color);
}

.paper-row { display: flex; gap: 1.5rem; margin-bottom: 1rem; }
.paper-field { display: flex; flex-direction: column; position: relative; }
.paper-field.half { flex: 1; }
.paper-field.full { width: 100%; }

.paper-field label {
    font-size: 0.8rem; font-weight: bold; color: #555; margin-bottom: 4px;
}

/* Inputs mimic written lines */
.paper-form .paper-field input, .paper-form .paper-field textarea {
    border: 1px solid #ccc;
    background: #fdfdfd; /* Slightly off-white */
    padding: 8px;
    font-size: 1rem;
    font-family: 'Courier New', Courier, monospace; /* Typewriter feel */
    color: #000;
}
.paper-form .paper-field input:disabled, .paper-form .paper-field textarea:disabled {
    background: #f9f9f9;
    color: #333;
    border-color: #eee;
    cursor: default;
}

/* Highlight missing fields in the form */
.paper-field.highlight-missing input,
.paper-field.highlight-missing textarea {
    background-color: #fff0f0;
    border-color: #ffcccc;
}

/* Edit Button inside form */
.edit-btn {
    position: absolute;
    right: 5px;
    bottom: 5px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.2rem;
}
.edit-btn:hover { color: var(--primary-color); }

.status-banner {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.paper-footer {
    margin-top: 3rem;
    border-top: 1px dashed #999;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.signature-box {
    border-bottom: 1px solid #000;
    width: 200px;
    text-align: center;
    padding-top: 30px;
    color: #666;
    font-size: 0.8rem;
}

.btn-submit {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }

/* Responsive */
@media (max-width: 900px) {
    main {
        height: auto; /* Allow full scroll on mobile */
    }
    .split-layout { flex-direction: column; height: auto; }
    .left-panel, .right-panel { width: 100%; flex: auto; height: auto; position: static; }
}

@keyframes pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- REFACTORED: Single body declaration with correct font management --- */
body {
    background: #f5f5f5;
    min-height: 100vh; /* Allow content to grow */
    overflow-y: auto; /* Restore body scroll */
    display: flex;
    flex-direction: column;
}
/* Default Font (English) */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
}
/* Bengali Font */
/* Animations - Moved to Refactored Section */
body.lang-bn {
    font-family: 'Noto Sans Bengali', sans-serif;
}
/* Hindi Font */
body.lang-hi {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.logo-text{
    position: absolute;
    width: 127px;
    top: 9px;
    left: 56px;
}

/* Header Styles */
header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0 2rem;
    position: sticky; /* Keep header visible */
    top: 0;
    z-index: 100;
}
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #025359;
    position: relative;
}
.nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-link {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s;
}
.nav-link:hover {
    color: #025359;
}
.user-dropdown {
    position: relative;
}
.user-btn {
    background: #e5e7eb;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.user-btn:hover {
    background: #d1d5db;
}
.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}
.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    display: block;
    transition: background 0.2s;
}
.dropdown-item:hover {
    background: #f3f4f6;
}

/* --- Language Selector Styling --- */
.language-selector-wrapper {
    display: flex;
    align-items: center;
}
.language-selector {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
    padding-right: 2rem;
}
.language-selector:focus {
    outline: none;
    border-color: #025359;
}


/* Main Content */
main {
    flex: 1; /* Grow to fill space */
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    padding: 1rem; 
    height: auto;
    min-height: calc(100vh - 60px); 
    box-sizing: border-box;
}

/* Ensure footer is visible below main content */
footer {
    flex-shrink: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.form-wrapper {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    padding: 2rem;
    color: white;
    text-align: center;
}

.form-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-header .bengali {
    font-size: 1.5rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.form-header p {
    color: #bfdbfe;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Tab Styles */
.tab-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    /* min-height: 100vh; */
    /* overflow: hidden removed to allow scrolling */
}
.tab-header {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}
.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #6b7280;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}
.tab-btn:hover {
    color: #025359;
}
.tab-btn.active {
    color: #025359;
    background: white;
    border-bottom-color: #025359;
    font-weight: bold;
}
.tab-content {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s;
}
.tab-content.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- NEW: Shared UI class for interactive tabs --- */
.voice-recorder-ui,
.document-uploader-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem; /* Reduced padding from 2rem to prevent overflow */
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    text-align: center;
    width: 100%; /* Ensure it takes full width of container */
}

/* --- Voice Recorder UI --- */
.prompt-title {
    margin-bottom: 0.5rem;
    color: #111827;
}
.prompt-message {
    margin-bottom: 1.5rem;
    color: #4b5563;
    max-width: 600px;
    text-align: center;
    line-height: 1.6;
}
.missing-fields-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.missing-field-chip {
    background-color: #e0e7ff;
    color: #3730a3;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #c7d2fe;
}
.record-button-wrapper { margin-bottom: 1rem; }
.record-btn {
    width: 80px; height: 80px; border-radius: 50%;
    /* UPDATED: Color matches the primary theme button */
    background-color: #025359;
    color: white; border: none; cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(2, 83, 89, 0.4);
}
.record-btn:hover { background-color: #3e6d6f; }
.record-btn .icon { font-size: 2.5rem; }
.record-btn.is-recording {
    background-color: #dc3545; box-shadow: 0 0 0 10px rgba(220, 53, 69, 0.4);
    animation: pulse 1.5s infinite;
}
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(220, 53, 69, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); } }
.recording-status-main { margin-bottom: 0.5rem; font-weight: 500; color: #374151; }
.recording-timer { font-size: 1.2rem; font-family: 'Courier New', Courier, monospace; color: #6b7280; margin-bottom: 1.5rem; }
.audio-preview-container { width: 100%; max-width: 500px; margin-bottom: 1.5rem; }
.audio-preview-container p { margin-bottom: 0.5rem; font-weight: 500; }
#audioPreviewPlayer { width: 100%; }
.action-buttons { display: flex; gap: 1rem; }

/* --- Document Uploader UI --- */
.doc-type-selector {
    padding: 0.75rem; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 1rem; width: 100%; margin-bottom: 1.5rem;
}
.dropzone {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    width: 100%; max-width: 100%; min-height: 150px; border: 2px dashed #ccc;
    border-radius: 8px; background-color: #fff; cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s; padding: 1rem; margin-bottom: 1.5rem;
}
/* UPDATED: Hover color matches the primary theme color */
.dropzone:hover { border-color: #025359; }
.dropzone.dragover { background-color: #e6f6f7; border-color: #025359; border-style: solid; }
.dropzone .icon { font-size: 2.5rem; color: #6b7280; margin-bottom: 0.5rem; }
#dropzoneText { color: #4b5563; font-weight: 500; }
.uploaded-files-container { width: 100%; max-width: 500px; margin-top: 2rem; text-align: left; }
.uploaded-files-title { font-size: 1.1rem; margin-bottom: 0.75rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; }
.uploaded-files-list { list-style: none; padding: 0; }
.uploaded-files-list li { background-color: #f3f4f6; padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 0.5rem; font-weight: 500; color: #374151; }


/* --- Final Form UI --- */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label, label { /* Combined for consistency */
    display: block; margin-bottom: 0.5rem; color: #374151; font-weight: 500;
}
.form-control, input[type="text"], input[type="email"], input[type="tel"], input[type="file"], textarea, select { /* Combined */
    width: 100%; padding: 0.75rem; border: 1px solid #d1d5db;
    border-radius: 6px; font-size: 0.95rem; transition: border-color 0.3s;
}
.form-control:focus, input:focus, textarea:focus, select:focus { /* Combined */
    outline: none; border-color: #025359;
}
textarea { resize: vertical; min-height: 120px; }
.form-group.highlight-missing .form-label { color: #b91c1c; }
.form-group.highlight-missing .form-control,
.form-group.highlight-missing input,
.form-group.highlight-missing select,
.form-group.highlight-missing textarea {
    border-color: #ef4444; box-shadow: 0 0 0 1px #ef4444;
}
.form-status-box {
    display: flex; align-items: center; background-color: #e9f5ff; border: 1px solid #b3d7ff;
    border-radius: 8px; padding: 1rem 1.5rem; margin-bottom: 2rem;
}
.form-status-box .icon { font-size: 1.5rem; margin-right: 1rem; }
.form-status-box .status-text strong { display: block; font-size: 1.1rem; color: #004085; margin-bottom: 0.25rem; }
.form-status-box .status-text p { color: #1c5f9c; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; }
#form-fieldset {
    display: contents;
}
.form-section-header { grid-column: 1 / -1; font-size: 1.1rem; margin-top: 1rem; margin-bottom: 0; padding-bottom: 0.5rem; border-bottom: 1px solid #e5e7eb; color: #374151; }
.form-section-header:first-of-type { margin-top: 0; }
.form-group.full-width { grid-column: 1 / -1; }
.form-column {
    /* This class is a container for a column's content */
    display: flex;
    flex-direction: column;
}

/* --- General Components (Buttons, etc.) --- */
.btn {
    padding: 0.75rem 1.5rem; background: #025359; color: white;
    border: none; border-radius: 6px; cursor: pointer;
    font-size: 0.95rem; transition: background 0.3s;
}
.btn:hover {
    background: #3e6d6f;
}
.btn-secondary {
    background: #6b7280;
}
.btn-secondary:hover {
    background: #4b5563;
}
.btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}


/* --- REMOVED OBSOLETE CODE --- */
/* The styles for .audio-controls, .audio-preview, .document-upload-section, */
/* .file-upload-wrapper, .file-input, .file-upload-label, .file-name, */
/* and the old bilingual styles (.bengali-text, .bengali-prompt, .bengali-label) */
/* have been completely removed as they are no longer used in the current HTML. */


/* Footer */
footer {
    background: #29292b; color: #9ca3af; padding: 2rem; margin-top: auto;
}
.footer-content {
    max-width: 1400px; margin: 0 auto; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem;
}
.footer-section h3 {
    color: white; margin-bottom: 1rem; font-size: 1.1rem;
}
.footer-section p, .footer-section a {
    color: #9ca3af; text-decoration: none; display: block; margin-bottom: 0.5rem;
}
.footer-section a:hover {
    color: #3e6d6f;
}
.footer-bottom {
    text-align: center; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #374151;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Give it a distinct background and border to separate from the white paper */
    border: 1px solid #9ca3af; 
    background-color: #f1f5f9; 
    border-radius: 6px;
    transition: border-color 0.3s;
    padding-right: 4px;
}

.input-wrapper .form-control,
.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    /* The input itself no longer needs a border, as the wrapper has it now */
    border: none;
    flex: 1; /* Allow to grow/shrink */
    min-width: 0; /* CRITICAL for preventing flex overflow */
    width: 100%; 
    background-color: transparent; /* Ensure wrapper background shows through */
}

/* Ensure buttons inside wrapper don't shrink */
.edit-field-btn {
    flex-shrink: 0;
}

/* When a field is being edited, give the wrapper a focus ring */
.input-wrapper.is-editing {
    border-color: #025359;
    box-shadow: 0 0 0 1px #025359;
}

/* Adjust the highlighting for missing fields to target the wrapper */
.form-group.highlight-missing .input-wrapper {
    border-color: #ef4444; /* Red */
    box-shadow: 0 0 0 1px #ef4444;
}

/* The input fields themselves get the border back from the main form-control rule */
/* We need to override the transparent border for the wrapper */
.form-group .input-wrapper {
    border: 1px solid #d1d5db;
}

.edit-field-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    margin-right: 0.25rem;
    cursor: pointer;
    font-size: 1.2rem;
    color: #6b7280;
    transition: color 0.2s;
    border-radius: 50%;
}

.edit-field-btn:hover {
    color: #025359;
}

/* Style for the 'confirm' state (check mark) */
.edit-field-btn.confirm-mode {
    color: #16a34a; /* A nice green color */
}
.edit-field-btn.confirm-mode:hover {
    color: #15803d; /* Darker green on hover */
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content { flex-direction: column; height: auto; padding: 1rem 0; }
    .nav-right { margin-top: 1rem; flex-wrap: wrap; justify-content: center; }
    .tab-header { flex-direction: column; }
    .tab-btn { width: 100%; text-align: left; }
    .form-grid { grid-template-columns: 1fr; }
}



/* --- Bandhan Bank Theme Specifics --- */

.bandhan-theme {
    font-family: Arial, sans-serif;
    color: #333;
    padding: 20px; /* Reduced from 40px to prevent overflow on smaller screens */
    background: #fff;
    border-top: 10px solid #ed1c24; /* Bandhan Red */
}

@media (min-width: 900px) {
    .bandhan-theme {
        padding: 40px; /* Restore padding on larger screens */
    }
}

/* Header */
.bandhan-header {
    border-bottom: 2px solid #ed1c24;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.logo-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.bank-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.circle-logo {
    width: 40px; height: 40px;
    background: #ed1c24;
    border-radius: 50%;
}
.text-logo {
    font-weight: bold;
    font-size: 1.4rem;
    line-height: 1.1;
    color: #000;
}

.form-title-block h2 {
    color: #ed1c24;
    font-size: 1.4rem;
    margin: 0;
    text-align: right;
    font-weight: bold;
}
.form-title-block p {
    text-align: right;
    font-size: 0.85rem;
    color: #ed1c24;
}

.meta-row {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}

/* Sections */
.paper-section {
    margin-bottom: 30px;
}

.section-header-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.section-letter {
    color: #ed1c24;
    font-weight: bold;
    font-size: 1.1rem;
}
.section-name {
    color: #ed1c24;
    font-weight: bold;
    font-size: 1.1rem;
}

.section-title-bar {
    color: #ed1c24;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Form Fields */
.paper-row {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}
.mt-2 { margin-top: 20px; }

.paper-field { flex: 1; }
.paper-field.full { width: 100%; }
.paper-field.short { max-width: 150px; min-width: 120px; }

.paper-field label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #444;
}

/* Input Styles mimicking the PDF boxes */
.box-grid-input {
    width: 100%;
    height: 35px;
    border: 1px solid #777;
    background: transparent;
    padding-left: 5px;
    letter-spacing: 3px; /* Mimic individual boxes */
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
}

.box-input {
    width: 100%;
    height: 35px;
    border: 1px solid #777;
    padding: 5px;
}

.line-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #777;
    background: #fdfdfd;
}

.uppercase { text-transform: uppercase; }

/* Checkboxes */
.checkbox-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.checkbox-grid label {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Address Block */
.address-block {
    background: #f9f9f9;
    padding: 10px;
    border: 1px dashed #ccc;
}
.block-label {
    font-weight: bold;
    color: #ed1c24;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

/* Live Status Bar */
.live-status-bar {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* --- Paper Form Container --- */
.paper-form-container {
    background-color: #ffffff; /* Explicitly set white background */
    width: 100%;
    max-width: 800px;
    min-height: 100%; /* Ensure it fills the vertical space */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1);
    margin: 0 auto; /* Center it */
    box-sizing: border-box; /* Include padding/border in width/height */
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Ensure rows wrap on smaller screens */
.paper-row {
    flex-wrap: wrap; 
}

/* Ensure inputs don't overflow */
.box-grid-input {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure fields wrap properly */
.paper-field { 
    flex: 1; 
    min-width: 150px; /* Reduced to prevent overflow on very small screens */
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .bandhan-theme {
        padding: 20px; /* Reduce padding on small screens */
    }
    .paper-row {
        gap: 10px; /* Reduce gap */
    }
}

/* --- Large Screen (4K) Optimizations --- */
@media (min-width: 2000px) {
    .split-layout {
        max-width: 95%; /* Use more screen width on large displays */
        padding: 0 4rem;
    }
    
    .left-panel {
        flex: 0 0 600px; /* Wider left panel for better readability on 4K */
        padding: 2.5rem; /* More padding */
    }
    
    .voice-recorder-ui, 
    .document-uploader-ui {
        padding: 3rem; /* More spacing inside UI components */
    }
    
    .record-btn {
        width: 120px;
        height: 120px;
    }
    
    .record-btn .icon {
        font-size: 4rem;
    }
    
    /* Ensure form is centered and looks good */
    .right-panel {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}