/* Custom button colors to match purple theme */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4291 100%);
    color: white;
}

.btn-outline-primary {
    color: #667eea;
    border-color: #667eea;
    background: white;
}
.btn-outline-primary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

.btn-success {
    background: #10b981;
    border-color: #10b981;
}
.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

.btn-outline-success {
    color: #10b981;
    border-color: #10b981;
    background: white;
}
.btn-outline-success:hover {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
}

.table-actions {
    white-space: nowrap;
}

.navbar-text .badge {
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
}

.form-label {
    font-weight: 600;
}

.alert {
    border-radius: 0.25rem;
}

.modal-header {
    background-color: #0d6efd;
    color: white;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.text-muted {
    font-style: italic;
}

.pagination {
    margin-top: 1rem;
}

.filter-form {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Content card for main page content */
.content-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* Table wrapper with white background */
.table-responsive {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.reconciliation-summary {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.reconciliation-summary h4 {
    margin-bottom: 1rem;
    color: #0d6efd;
}

.reconciliation-summary .row {
    margin-bottom: 0.5rem;
}

.difference-zero {
    color: #198754;
    font-weight: bold;
}

.difference-nonzero {
    color: #dc3545;
    font-weight: bold;
}

/* ==========================================
   iPad / Tablet Friendly Styles
   ========================================== */

/* Larger form inputs for easier touch */
.form-control,
.form-select {
    min-height: 48px;
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

/* Larger buttons - minimum 48px height for touch targets */
.btn {
    min-height: 44px;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
}

.btn-lg {
    min-height: 56px;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
}

/* Touch-friendly action buttons */
.btn-touch {
    min-height: 48px;
    min-width: 80px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
}

/* Larger table rows for easier tapping */
.table > tbody > tr > td,
.table > tbody > tr > th {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.table > thead > tr > th {
    padding: 1rem 0.75rem;
}

/* Larger checkboxes for reconciliation */
.form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Large checkbox for table rows */
.checkbox-lg {
    width: 1.75rem;
    height: 1.75rem;
    cursor: pointer;
}

/* Action button group - larger for touch */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    min-width: 70px;
}

/* Pagination - larger touch targets */
.pagination .page-link {
    min-height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

/* Filter form spacing */
.filter-form .form-control,
.filter-form .form-select {
    margin-bottom: 0.5rem;
}

/* Card attachments - larger touch targets */
.attachment-card .btn {
    min-height: 40px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Page header with action buttons */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin-bottom: 0;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.page-header .btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Form sections with better spacing */
.form-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-section h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Summary cards - larger and touch-friendly */
.summary-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.summary-card .label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.summary-card .value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Badge improvements */
.badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    font-weight: 600;
}

/* Responsive adjustments for tablets */
@media (max-width: 991px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header .btn-group {
        width: 100%;
    }
    
    .page-header .btn-group .btn {
        flex: 1;
    }
    
    .filter-form .row {
        gap: 0.5rem;
    }
    
    .table-responsive {
        margin: 0 -0.75rem;
    }
}

/* Print styles - hide tablet UI enhancements */
@media print {
    .btn,
    .action-buttons,
    .filter-form,
    .pagination {
        display: none !important;
    }
    
    .table > tbody > tr > td,
    .table > tbody > tr > th,
    .table > thead > tr > th {
        padding: 0.5rem;
    }
}
