/* Common styles for Ledger Management System */
[x-cloak] { 
    display: none !important; 
}

body {
    font-family: 'Inter', sans-serif;
}

/* Card animations */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Table styles */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.table-responsive table {
    min-width: 640px;
}

@media (max-width: 640px) {
    .table-responsive {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem;
    }
}

/* Form styles */
.form-control:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 1px #0ea5e9;
}

/* Button styles */
.btn-primary {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: #e5e7eb !important;
}

.dark .btn-primary {
    background-color: #374151 !important;
    color: #f3f4f6 !important;
    border: 1px solid #4b5563 !important;
}

.dark .btn-primary:hover {
    background-color: #4b5563 !important;
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.5) !important;
}

.dark .btn-primary:focus {
    box-shadow: 0 0 0 2px rgba(75, 85, 99, 0.5) !important;
}

/* Modal styles */
.modal-content {
    border-radius: 0.5rem;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0ea5e9;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0284c7;
}

/* Dark mode styles */
.dark .form-control {
    background-color: #1f2937;
    border-color: #374151;
    color: #fff;
}

.dark .form-control:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 1px #0ea5e9;
}

.dark .modal-content {
    background-color: #1f2937;
    color: #fff;
}

/* Utility classes */
.text-primary {
    color: #0ea5e9;
}

.bg-primary {
    background-color: #0ea5e9;
}

/* Alert styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Badge styles */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.bg-success {
    background-color: #22c55e;
}

.bg-danger {
    background-color: #ef4444;
}

/* Additional style to remove default date icon for WebKit browsers */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    display: none;
}

/* Firefox (removes arrow icon as well) */
input[type="date"]::-moz-focus-inner {
    border: 0;
}

/* Mobile responsive styles */
@media (max-width: 640px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .text-2xl {
        font-size: 1.5rem;
    }
    
    .stat-card .text-3xl {
        font-size: 1.75rem;
    }
    
    .grid-cols-1 {
        gap: 1rem;
    }
    
    .p-4 {
        padding: 1rem;
    }
    
    .mb-6 {
        margin-bottom: 1rem;
    }
    
    .flex.space-x-4 {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .flex.space-x-4 > * {
        margin-right: 0;
    }
    
    .btn-primary {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}

/* Form responsive styles */
@media (max-width: 640px) {
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .form-control {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row > * {
        width: 100%;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .form-row > *:last-child {
        margin-bottom: 0;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer button {
        width: 100%;
    }
    
    .date-range-filter {
        flex-direction: column;
        gap: 1rem;
    }
    
    .date-range-filter > * {
        width: 100%;
    }
    
    .date-range-filter button {
        width: 100%;
    }
}

/* Additional responsive utilities */
@media (max-width: 640px) {
    .hidden-mobile {
        display: none !important;
    }
    
    .block-mobile {
        display: block !important;
    }
    
    .text-center-mobile {
        text-align: center !important;
    }
    
    .w-full-mobile {
        width: 100% !important;
    }
    
    .flex-col-mobile {
        flex-direction: column !important;
    }
    
    .space-y-mobile {
        margin-top: 1rem !important;
    }
    
    .space-y-mobile > * + * {
        margin-top: 1rem !important;
    }
}