body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar {
    background-color: #0F172A !important;
    color: white;
}

.section-title {
    color: #1a73e8;
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.card-title {
    color: #0F172A;
}

.btn-primary {
    background-color: #1a73e8;
    border-color: #1a73e8;
}

.btn-primary:hover {
    background-color: #1557b0;
    border-color: #1557b0;
}

.btn-outline-primary {
    color: #1a73e8;
    border-color: #1a73e8;
}

.btn-outline-primary:hover {
    background-color: #1a73e8;
    color: white;
}

.btn-success {
    background-color: #10B981;
    border-color: #10B981;
}

.btn-success:hover {
    background-color: #0c8a66;
    border-color: #0c8a66;
}

.btn-outline-danger {
    color: #D93025;
    border-color: #D93025;
}

.btn-outline-danger:hover {
    background-color: #D93025;
    color: white;
}

.form-control:focus,
.form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.25rem rgba(26, 115, 232, 0.25);
}

/* Custom styles for verification fields */
.form-control[id^="field_"] {
    background-color: #fdfae7; /* Light yellow for unverified */
}

.form-control[id^="field_"]:focus {
    background-color: #fff;
}

/* Ensure headers for individual items are not too large */
.card-body h6.text-muted {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: #6c757d !important;
}

/* Specific styling for labels within form groups */
.card-body label.small {
    font-size: 0.75rem;
    color: #555;
    margin-bottom: 0.2rem;
    display: block;
}

/* Adjust textarea height to be responsive */
textarea.form-control-sm {
    min-height: 50px;
}

/* Ensure file list items have proper spacing */
.list-group-item {
    padding: 0.5rem 1rem;
}

/* Make section titles stand out more */
h5.card-title.section-title,
h6.section-title {
    font-size: 1.1rem;
    color: #1a73e8;
    margin-top: 1rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.4rem;
}

/* Hide Bootstrap's default outlines on focus for select elements */
.form-select:focus {
    outline: none;
}

/* Small text for file list and status messages */
.small {
    font-size: 0.875em;
}

/* --- Hindi Legacy Font & Hybrid UI Layout styling --- */

@font-face {
    font-family: 'DevLys 010';
    src: local('DevLys 010'), local('DevLys-010');
}

@font-face {
    font-family: 'DevLys 040';
    src: local('DevLys 040'), local('DevLys-040');
}

@font-face {
    font-family: 'Kruti Dev 010';
    src: local('Kruti Dev 010'), local('KrutiDev-010'), local('Kruti Dev-010');
}

.hindi-legacy-input {
    font-family: 'Segoe UI', 'Mangal', 'Arial Unicode MS', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    background-color: #fefcf0 !important; /* Extremely soft warm yellow for Hindi inputs */
    direction: ltr;
}

.hindi-legacy-input:focus {
    background-color: #ffffff !important;
    border-color: #eab308; /* Soft amber border for active legacy fields */
    box-shadow: 0 0 0 0.25rem rgba(234, 179, 8, 0.2);
}

/* Bilingual side-by-side field columns */
.bilingual-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.bilingual-col-english {
    flex: 1;
}

.bilingual-col-hindi {
    flex: 1;
}

.transliterate-btn {
    background: none;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #f8fafc;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.transliterate-btn:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
    transform: scale(1.05);
}

.transliterate-btn:active {
    transform: scale(0.95);
}

/* Styled grids for Payments and Title Chain */
.grid-table {
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.grid-table th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 12px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.grid-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.grid-table tbody tr:last-child td {
    border-bottom: none;
}

.grid-table tbody tr:hover {
    background-color: #f8fafc;
}

.grid-table .form-control-sm {
    border-color: #e2e8f0;
}

.btn-icon-danger {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    line-height: 1;
}

.btn-icon-danger:hover {
    background-color: #fee2e2;
}

/* Subtle highlights for verified fields in dynamic toggle layout */
.verify-check {
    cursor: pointer;
    width: 15px;
    height: 15px;
}

