/* Custom styles for the document OCR application */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Orbitron:wght@400;500;700&display=swap');

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
}

.font-orbitron {
    font-family: 'Orbitron', sans-serif;
}

.text-white span , 
.text-white svg ,
button.text-white ,
.text-white {
    color: #ffffff !important;
}
/* Dark Theme Specifics */
.dark body {
    background-color: #111827; /* gray-900 */
    color: #D1D5DB; /* gray-300 */
}

.dark .bg-gray-800 {
    background-color: #1F2937;
}

.dark .border-gray-600 {
    border-color: #4B5563;
}

.dark .hover\:border-indigo-500:hover {
    border-color: #6366F1;
}

.dark .text-gray-400 {
    color: #9CA3AF;
}

.dark .text-gray-500 {
    color: #6B7280;
}

.dark .text-indigo-300 {
    color: #A5B4FC;
}

.dark .text-indigo-400 {
    color: #818CF8;
}

.dark .bg-indigo-600 {
    background-color: #4F46E5;
}

.dark .hover\:bg-indigo-700:hover {
    background-color: #4338CA;
}

.dark .bg-green-600 {
    background-color: #0D4D3B;
}

.dark .hover\:bg-green-700:hover {
    background-color: #0D4D3B;
}

.dark .shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 15px rgba(99, 102, 241, 0.3);
}

/* Custom Scrollbar for Preview Area */
.styled-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #4B5563 #1F2937; /* thumb track */
}

.styled-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.styled-scrollbar::-webkit-scrollbar-track {
    background: #1F2937; /* bg-gray-800 */
    border-radius: 10px;
}

.styled-scrollbar::-webkit-scrollbar-thumb {
    background-color: #4B5563; /* border-gray-600 */
    border-radius: 10px;
    border: 2px solid #1F2937; /* bg-gray-800 to create a padding effect */
}

.styled-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #6366F1; /* indigo-500 */
}

/* Drop Zone Animation */
#dropZone {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

#dropZone.drag-over {
    background-color: rgba(79, 70, 229, 0.1); /* indigo-600 with opacity */
    border-color: #6366F1; /* indigo-500 */
}

/* HTML Preview Area - basic styling for generated content */
#htmlPreview h1, #htmlPreview h2, #htmlPreview h3, #htmlPreview h4, #htmlPreview h5, #htmlPreview h6 {
    color: #A5B4FC; /* indigo-300 */
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
}
#htmlPreview p {
    margin-bottom: 0.75em;
    line-height: 1.6;
}
#htmlPreview table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    color: #D1D5DB;
}
#htmlPreview th, #htmlPreview td {
    border: 1px solid #4B5563; /* border-gray-600 */
    padding: 0.5em;
    text-align: left;
}
#htmlPreview th {
    background-color: #374151; /* gray-700 */
}
#htmlPreview ul, #htmlPreview ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}
#htmlPreview li {
    margin-bottom: 0.25em;
}
#htmlPreview code {
    background-color: #374151; /* gray-700 */
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}
#htmlPreview pre {
    background-color: #111827; /* gray-900 for code blocks */
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid #374151; /* gray-700 */
}
#htmlPreview pre code {
    background-color: transparent;
    padding: 0;
}
#htmlPreview blockquote {
    border-left: 4px solid #6366F1; /* indigo-500 */
    padding-left: 1em;
    margin-left: 0;
    margin-bottom: 1em;
    font-style: italic;
    color: #9CA3AF; /* gray-400 */
}
#htmlPreview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.5em;
}

/* Status Messages (Error/Success) */
.status-message {
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    border-radius: 0.375rem; /* rounded-md */
    font-size: 0.875rem; /* text-sm */
    display: flex;
    align-items: center;
    gap: 0.5rem; /* space-x-2 */
}

.status-message.success {
    background-color: #065F46; /* green-800 */
    color: #A7F3D0; /* green-200 */
    border: 1px solid #047857; /* green-600 */
}

.status-message.error {
    background-color: #991B1B; /* red-800 */
    color: #FEE2E2; /* red-200 */
    border: 1px solid #DC2626; /* red-600 */
}

.status-message.info {
    background-color: #1E40AF; /* blue-800 */
    color: #DBEAFE; /* blue-200 */
    border: 1px solid #1D4ED8; /* blue-600 */
}

/* Progress bar animation */
#progressBar {
    transition: width 0.5s ease-out;
}

/* Preview styles */
#preview {
    background-color: #F9FAFB;
}

#preview img {
    max-width: 100%;
    height: auto;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #9CA3AF;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #preview {
        min-height: 300px;
    }
}

/* Error message styles */
.error-message {
    color: #DC2626;
    background-color: #FEE2E2;
    border: 1px solid #FCA5A5;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

/* Success message styles */
.success-message {
    color: #059669;
    background-color: #D1FAE5;
    border: 1px solid #A7F3D0;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

/* Page Navigation Controls */
.page-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: #1F2937; /* bg-gray-800 */
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 0.375rem;
    background-color: #374151; /* gray-700 */
    color: #D1D5DB; /* gray-300 */
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background-color: #4F46E5; /* indigo-600 */
    color: white;
}

.nav-btn:disabled {
    background-color: #1F2937; /* bg-gray-800 */
    color: #4B5563; /* gray-600 */
    cursor: not-allowed;
}

#pageCounter {
    font-size: 0.875rem;
    color: #D1D5DB; /* gray-300 */
}

.hidden {
    display: none !important;
}

/* Full-screen document viewer improvements */
#previewArea {
    min-height: 500px; /* Minimum height */
    height: calc(100vh - 4rem); /* Responsive height based on viewport */
}

#htmlPreview {
    width: 100%;
    min-height: 100%;
    overflow: auto;
}

/* Make sure the document content is properly displayed */
#htmlPreview img, #htmlPreview table {
    max-width: 100% !important;
    height: auto !important;
}

#htmlPreview iframe {
    width: 100%;
    min-height: 500px;
    border: none;
}

/* Summary panel styling */
#documentSummaryPanel {
    border-left: 4px solid #6366F1; /* indigo-500 */
    background-color: rgba(99, 102, 241, 0.1);
}

#signatureStatus.text-green-400 {
    color: #0D4D3B;
}

#signatureStatus.text-yellow-400 {
    color: #FBBF24;
}

#signatureStatus.text-red-400 {
    color: #F87171;
}

/* Floating Upload Button */
.floating-button button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Upload Modal Overlay Animation */
.upload-modal {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.upload-modal .bg-gray-800 {
    animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Full-screen viewer adjustments */
.viewer-container {
    display: flex;
    flex-direction: column;
}

/* Document Summary Bar */
#documentSummaryBar {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Header Navigation Buttons */
#pageNavigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pageNavigation button:not(:disabled):hover i {
    transform: scale(1.1);
}

/* Responsive adjustments for small screens */
@media (max-width: 768px) {
    .floating-button {
        bottom: 1rem;
        right: 1rem;
    }
    
    .floating-button button {
        padding: 0.75rem;
    }
    
    .floating-button button i {
        height: 1.25rem;
        width: 1.25rem;
    }
    
    #documentSummaryBar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #documentSummaryBar > div:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Enhanced placeholder styling */
#placeholderPreview {
    animation: fadeIn 0.5s ease-out;
}

/* Status message positioning in modal */
#uploadModal .status-message {
    margin-top: 0.5rem;
}

/* Progress bar styles for background processing */
.progress-container {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #374151;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.status-text {
    color: #d1d5db;
    font-size: 14px;
    text-align: center;
    margin-bottom: 8px;
}

.processing-details {
    text-align: center;
    margin-top: 16px;
}

.processing-details small {
    color: #9ca3af;
    font-size: 12px;
}

/* Processing modal specific styles */
#processingModal .modal-content {
    max-width: 500px;
    width: 90%;
}

#processingModal .modal-body {
    padding: 24px;
}

/* Destination edit modal styles for scrolling */
.destination-edit.modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.destination-edit .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 120px); /* Account for header and footer */
}

/* Enhanced loading states */
.processing-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #374151;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Background processing indicators */
.bg-processing {
    position: relative;
    overflow: hidden;
}

.bg-processing::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    animation: loading-indicator 2s infinite;
}

@keyframes loading-indicator {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Status badges for different processing states */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.processing {
    background-color: #fbbf24;
    color: #92400e;
}

.status-badge.completed {
    background-color: #0D4D3B;
    color: #065f46;
}

.status-badge.error {
    background-color: #ef4444;
    color: #991b1b;
}

.status-badge.queued {
    background-color: #6b7280;
    color: #f9fafb;
}

/* ========================================
   📊 JOURNAL MANAGER SPECIFIC STYLES
   ======================================== */

/* Journal Header */
.journal-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border-bottom: 1px solid var(--light-border);
    box-shadow: 0 2px 8px rgba(15, 58, 92, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.light .journal-header {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border-bottom: 1px solid var(--light-border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--egyptian-blue);
    margin: 0;
}

/* Selector Inputs */
.selector-input {
    background: #FFFFFF;
    border: 1px solid var(--light-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--light-text-primary);
    min-width: 150px;
    transition: all 0.3s ease;
}

.selector-input:focus {
    outline: none;
    border-color: var(--royal-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.selector-input:hover {
    border-color: var(--royal-blue);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.summary-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 1px solid var(--light-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: var(--light-shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--light-shadow-lg);
    border-color: var(--royal-blue);
}

.summary-card p:first-child {
    font-size: 0.75rem;
    color: var(--light-text-secondary);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-card p:last-child {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--egyptian-blue);
}

/* Table Actions */
.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem 1rem 1.5rem;
    gap: 1rem;
}

.actions-left {
    display: flex;
    gap: 0.5rem;
}

.actions-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-filter-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input {
    background: #FFFFFF;
    border: 1px solid var(--light-border);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    padding-left: 2.5rem;
    font-size: 0.875rem;
    color: var(--light-text-primary);
    width: 250px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--royal-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.filter-btn {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--azure-blue) 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--light-shadow-md);
}

/* Journal Table Container */
.journal-table-container {
    margin: 0 1.5rem 2rem 1.5rem;
    background: #FFFFFF;
    border: 1px solid var(--light-border);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--light-shadow-md);
}

.journal-table {
    width: 100%;
    border-collapse: collapse;
}

.journal-table thead {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-bottom: 2px solid var(--light-border);
}

.journal-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--egyptian-blue);
    border-right: 1px solid var(--light-border);
}

.journal-table th:last-child {
    border-right: none;
}

.journal-table tbody tr {
    border-bottom: 1px solid var(--light-border);
    transition: all 0.2s ease;
}

.journal-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.02) 0%, rgba(0, 124, 255, 0.01) 100%);
}

.journal-table td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--light-text-primary);
    border-right: 1px solid var(--light-border);
}

.journal-table td:last-child {
    border-right: none;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--light-shadow-md);
}

.btn-success {
    background-color: #0D4D3B;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #0D4D3B;
}

.btn-danger {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Status Badge Variants */
.status-pending {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    color: #D97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.status-approved {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-rejected {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #DC2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .summary-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .journal-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .table-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .journal-table-container {
        overflow-x: auto;
    }
} 

/* Document Navigation Buttons */
.document-nav-btn {
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    border: 1px solid #4338CA;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.document-nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.document-nav-btn:disabled {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.document-nav-btn i {
    transition: transform 0.2s ease;
}

.document-nav-btn:hover:not(:disabled) i {
    transform: scale(1.1);
}

/* Document Counter Badge */
.document-counter {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Current Document Info Styling - Light Theme */
.current-doc-info {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: #334155;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
    word-break: break-all;
    max-width: 300px;
    font-family: 'Inter', system-ui, sans-serif;
}

/* Document Actions Section - Light Theme */
.document-actions-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.08);
}

/* Action Buttons in Document Actions */
.document-action-btn {
    background-color: #0D4D3B;
    border: 1px solid #0D4D3B;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    font-family: 'Inter', system-ui, sans-serif;
}

.document-action-btn.reject {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.document-action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

.document-action-btn.reject:hover:not(:disabled) {
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.4);
}

.document-action-btn:disabled {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
} 

/* Excel-like table styling for journal entries */
#journal-entries-table input {
    padding: 2px 4px;
    font-size: 12px;
    transition: background-color 0.1s;
}

#journal-entries-table input:focus {
    background-color: rgba(59, 130, 246, 0.1);
    outline: none;
}

#journal-entries-table input:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Tooltip styling */
.konto-tooltip {
    max-width: 300px;
    font-size: 11px;
    border: 1px solid #374151;
    word-wrap: break-word;
}

/* Row hover effect */
#journal-entries-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Input validation styling */
.debit-input:invalid, .credit-input:invalid {
    border: 1px solid #ef4444;
} 

/* Client selector dropdown dark theme */
.client-selector-dropdown {
    background-color: #1f2937; /* Dark gray background */
    border: 1px solid #4b5563; /* Gray border */
    border-radius: 0.5rem; /* Rounded corners */
    padding: 0.5rem 1rem; /* Padding */
    color: #f3f4f6; /* White text */
    font-size: 0.875rem; /* Small text */
    transition: all 0.2s ease-in-out;
    min-width: 200px; /* Minimum width */
}

.client-selector-dropdown:focus {
    outline: none;
    border-color: #6366f1; /* Blue border on focus */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3); /* Blue glow */
}

.client-selector-dropdown:hover {
    border-color: #6b7280; /* Lighter border on hover */
}

/* Style the dropdown options */
.client-selector-dropdown option {
    background-color: #1f2937; /* Dark background for options */
    color: #f3f4f6; /* White text for options */
    padding: 0.5rem; /* Padding for options */
} 

/* ========================================
   🌟 LIGHT THEME SYSTEM
   ======================================== */

/* Light Theme Color Palette - Blue Collection */
:root {
    --egyptian-blue: #153A5C;
    --royal-blue: #4A90E2; 
    --cobalt-blue: #0B4F8B;
    --azure-blue: #007CFF;
    
    /* Light theme semantic colors */
    --light-bg-primary: #FAFBFE;     /* Off-white background */
    --light-bg-secondary: #F1F5F9;   /* Light gray */
    --light-bg-tertiary: #E2E8F0;    /* Card background */
    --light-text-primary: #1E293B;   /* Dark text */
    --light-text-secondary: #475569; /* Medium text */
    --light-text-muted: #64748B;     /* Muted text */
    --light-border: #CBD5E1;         /* Light borders */
    --light-border-hover: var(--royal-blue);
    
    /* Enhanced shadows for light theme */
    --light-shadow-sm: 0 2px 4px rgba(15, 58, 92, 0.08);
    --light-shadow-md: 0 4px 12px rgba(15, 58, 92, 0.12);
    --light-shadow-lg: 0 8px 24px rgba(15, 58, 92, 0.15);
    --light-shadow-xl: 0 16px 40px rgba(15, 58, 92, 0.18);
}

/* Light Theme Base Styles */
.light body {
    background-color: var(--light-bg-primary); /* Use a solid color for the body */
    color: var(--light-text-primary);
    font-size: 16px; /* Increased base font size */
}

.light main {
    background: linear-gradient(135deg, var(--light-bg-primary) 0%, #F8FAFC 100%);
}


/* ========================================
   📱 ENHANCED LAYOUT - LARGER CARDS
   ======================================== */

.light .bg-gray-800 {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 1px solid var(--light-border);
    box-shadow: var(--light-shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light .bg-gray-800 input,
.light .bg-gray-800 .text-white
 {
    color: #000000!important;
}

.light .bg-gray-800:hover {
    transform: translateY(-4px);
    box-shadow: var(--light-shadow-xl);
    border-color: var(--royal-blue);
}

/* Enhanced Card Sizing */
.light .p-6 {
    padding: 1.5rem; /* Standardize padding */
}

.light .rounded-xl {
    border-radius: 1rem; /* Standardize border-radius */
}

.light .bg-gray-800.rounded-xl.p-6 {
    min-height: 140px;
}


/* ========================================
   🎨 SIDEBAR LIGHT THEME
   ======================================== */

.light #sidebar {
    background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    border-right: 1px solid var(--light-border);
    box-shadow: 2px 0 16px rgba(15, 58, 92, 0.05);
}

.light #sidebar .border-b.border-gray-700,
.light #sidebar .border-t.border-gray-700 {
    border-color: var(--light-border);
}

.light .bg-indigo-600 {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--azure-blue) 100%);
}

.light .text-indigo-400 {
    color: var(--cobalt-blue);
    font-weight: 600;
}

.light .text-gray-200 {
    color: var(--light-text-primary);
    font-weight: 500;
}

.light .text-gray-400 {
    color: var(--light-text-secondary);
}

.light .nav-item:hover {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(0, 124, 255, 0.05) 100%);
    border-radius: 0.5rem;
    color: var(--cobalt-blue);
}
.light .nav-item:hover .sidebar-text {
    color: var(--cobalt-blue) !important;
}


.light .nav-item.active,
.light .nav-item.nav-item-active {
    background: linear-gradient(to right, #0D4D3B, #16896A) !important; /* light green */
    border-left: none !important;
    padding-left: 0.75rem !important;
    border-radius: 0 0.5rem 0.5rem 0 !important;
    color: #ffffff !important;
}

.light .nav-item.active .sidebar-text,
.light .nav-item.nav-item-active .sidebar-text {
    color: #ffffff !important;
    font-weight: 600;
}

.light .nav-item.active i,
.light .nav-item.nav-item-active i {
    color: #ffffff !important;
}


/* ========================================
   📊 ENHANCED TYPOGRAPHY
   ======================================== */

.light h1, .light h2, .light h3, .light h4, .light h5, .light h6 {
    color: var(--egyptian-blue);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.light .text-2xl {
    font-size: 1.5rem;
    line-height: 1.2;
}

.light .text-xl {
    font-size: 1.25rem;
    line-height: 1.3;
}

.light .text-lg {
    font-size: 1.125rem;
    line-height: 1.4;
}

/* Card titles and values */
.light .text-2xl.font-bold {
    font-size: 2rem !important;
    font-weight: 700;
    background: linear-gradient(135deg, var(--egyptian-blue) 0%, var(--cobalt-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.light .text-sm {
    font-size: 0.875rem;
    color: var(--light-text-secondary);
}

/* ========================================
   🎨 COLOR SYSTEM OVERRIDES
   ======================================== */

/* General Overrides */
.light .border-gray-700 { border-color: var(--light-border) !important; }
.light .border-gray-600 { border-color: var(--light-border) !important; }
.light .text-gray-200 { color: var(--light-text-primary) !important; }
.light .text-gray-400 { color: var(--light-text-secondary) !important; }
.light .text-gray-500 { color: var(--light-text-muted) !important; }
.light .bg-gray-800 { background: #fff !important; } /* Default card background */
.light .bg-gray-900 { background: var(--light-bg-primary) !important; } /* Main background */
.light header { background: #FFFFFF; }


/* Indigo/Blue variants */
.light .text-indigo-400 { color: var(--royal-blue) !important; }
.light .text-indigo-300 { color: var(--azure-blue) !important; }
.light .bg-indigo-600 { background: linear-gradient(135deg, var(--royal-blue) 0%, var(--azure-blue) 100%) !important; }
.light .bg-indigo-700 { background: linear-gradient(135deg, var(--cobalt-blue) 0%, var(--egyptian-blue) 100%) !important; }
.light .border-indigo-500 { border-color: var(--royal-blue) !important; }

/* Green variants - unified brand green */
.light .bg-green-500,
.bg-green-500 {
  background-color: #0D4D3B !important;
  background-image: none !important;
}

.light .bg-green-600,
.bg-green-600 {
  background-color: #0D4D3B !important;
  background-image: none !important;
}

.light .bg-green-700,
.bg-green-700 {
  background-color: #0D4D3B !important;
  background-image: none !important;
}

/* ========================================
   🎨 BRAND COLORS
   ========================================
   Brand Green: #0D4D3B (Primary brand color)
   Brand Blue: #121e60 (Secondary brand color)
   ======================================== */

/* Brand green text utility */
.text-brand-green {
  color: #0D4D3B !important;
}

.hover\:text-brand-green:hover {
  color: #0A3A2C !important;
}

.bg-brand-green {
  background-color: #0D4D3B !important;
}

.hover\:bg-brand-green:hover {
  background-color: #0A3A2C !important;
}

/* Brand blue text utility */
.text-brand-blue {
  color: #121e60 !important;
}

.hover\:text-brand-blue:hover {
  color: #0f1847 !important;
}

.bg-brand-blue {
  background-color: #121e60 !important;
}

.hover\:bg-brand-blue:hover {
  background-color: #0f1847 !important;
}

/* Yellow variants */
.light .text-yellow-400 { color: #D97706 !important; }

/* Red variants */
.light .text-red-400 { color: #DC2626 !important; }

/* Purple variants */
.light .text-purple-400 { color: #121e60 !important; }
.light .bg-purple-600 { background: linear-gradient(135deg, #121e60 0%, #3346ac 100%) !important; }


/* Orange variants */
.light .text-orange-400 { color: #EA580C !important; }

/* Cyan variants */
.light .text-cyan-400 { color: var(--azure-blue) !important; }

/* ========================================
   🎭 ENHANCED ANIMATIONS
   ======================================== */

.light .enhanced-card-animation {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.light .enhanced-card-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.05) 0%, rgba(0, 124, 255, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.light .enhanced-card-animation:hover::before {
    opacity: 1;
}

.light .enhanced-card-animation:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 24px 48px rgba(15, 58, 92, 0.15),
        0 12px 24px rgba(74, 144, 226, 0.1),
        0 0 0 1px rgba(74, 144, 226, 0.2);
}

/* Staggered entrance animations */
@keyframes slideInUpLight {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.light .animate-entrance {
    animation: slideInUpLight 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.light .animate-entrance:nth-child(1) { animation-delay: 0.1s; }
.light .animate-entrance:nth-child(2) { animation-delay: 0.2s; }
.light .animate-entrance:nth-child(3) { animation-delay: 0.3s; }
.light .animate-entrance:nth-child(4) { animation-delay: 0.4s; }
.light .animate-entrance:nth-child(5) { animation-delay: 0.5s; }
.light .animate-entrance:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   📱 ENHANCED BUTTONS
   ======================================== */

.light button, .light .btn {
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.light button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.light button:hover::before {
    opacity: 1;
}

.light button:hover {
    transform: translateY(-2px);
    box-shadow: var(--light-shadow-md);
}

.light button:active {
    transform: translateY(0);
}

/* ========================================
   🔄 SCROLLBARS
   ======================================== */

.light .styled-scrollbar, .light ::-webkit-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--light-border) var(--light-bg-secondary);
}

.light .styled-scrollbar::-webkit-scrollbar, .light ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.light .styled-scrollbar::-webkit-scrollbar-track, .light ::-webkit-scrollbar-track {
    background: var(--light-bg-secondary);
    border-radius: 10px;
}

.light .styled-scrollbar::-webkit-scrollbar-thumb, .light ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--royal-blue) 0%, var(--azure-blue) 100%);
    border-radius: 10px;
    border: 2px solid var(--light-bg-secondary);
}

.light .styled-scrollbar::-webkit-scrollbar-thumb:hover, .light ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--cobalt-blue) 0%, var(--royal-blue) 100%);
}

/* ========================================
   🎯 BORDERS AND EFFECTS
   ======================================== */

.light .border-gray-700 {
    border-color: var(--light-border);
}

.light .border-gray-600 {
    border-color: var(--light-border);
}

/* Header styling */
.light header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--light-border);
    box-shadow: 0 2px 8px rgba(15, 58, 92, 0.05);
}

/* ========================================
   📊 DEPARTMENT CARDS ENHANCEMENT
   ======================================== */

.light .department-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 1px solid var(--light-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 200px;
}

.light .department-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--light-shadow-xl);
    border-color: var(--royal-blue);
}

/* ========================================
   🌈 STATUS INDICATORS
   ======================================== */

.light .status-active {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.light .status-inactive {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: #DC2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
} 


#grouping-toggle-btn{
    display: none;
}