/* Custom styles for Invoice Reader application */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: 600;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 500;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--dark-color);
}

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-group .btn {
    border-radius: 0.375rem;
}

.btn-group .btn:not(:first-child) {
    margin-left: 2px;
}

/* File upload styling */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Progress bar styling */
.progress {
    height: 1rem;
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

.progress-bar {
    background-color: var(--primary-color);
    transition: width 0.6s ease;
}

/* Status badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Table responsiveness */
.table-responsive {
    border-radius: 0.375rem;
}

/* Form styling */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 0.375rem;
}

/* Alert styling */
.alert {
    border-radius: 0.375rem;
    border: none;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Custom utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom pagination */
.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hover effects */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

.btn:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .pagination,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .table {
        font-size: 0.875rem;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #212529;
        --bs-body-color: #dee2e6;
    }
}
