/* Site-specific custom styles */

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #212529;
}

[data-bs-theme="dark"] .page-header {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .page-header h1 {
    color: #f8f9fa;
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* Data Grid Actions */
.grid-actions {
    display: flex;
    gap: 0.25rem;
}

.grid-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Required Field Indicator */
.required::after {
    content: " *";
    color: #dc3545;
}

/* Validation Styles */
.field-validation-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.input-validation-error {
    border-color: #dc3545 !important;
}

.validation-summary-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.25rem;
}

.validation-summary-errors li {
    color: #842029;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading State */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.375rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Dashboard specific styles */
.dashboard-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Recipe/BOM Table */
.recipe-table td input {
    max-width: 150px;
}

/* Cost Allocation Table */
.cost-table {
    font-size: 0.875rem;
}

.cost-table .total-row {
    font-weight: 600;
    background-color: #f8f9fa;
}

[data-bs-theme="dark"] .cost-table .total-row {
    background-color: #343a40;
}

/* Report Filters */
.report-filters {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

[data-bs-theme="dark"] .report-filters {
    background-color: #343a40;
}

/* Barcode Display */
.barcode-display {
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    border: 2px dashed #6c757d;
    border-radius: 0.375rem;
    display: inline-block;
}

[data-bs-theme="dark"] .barcode-display {
    background-color: #343a40;
    border-color: #adb5bd;
}

/* Status Badges */
.status-badge {
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-processed {
    background-color: #198754;
    color: white;
}

.status-unprocessed {
    background-color: #ffc107;
    color: #000;
}

.status-completed {
    background-color: #0dcaf0;
    color: #000;
}

/* Quantity Display */
.quantity-display {
    font-weight: 600;
    color: #0d6efd;
}

.quantity-negative {
    color: #dc3545;
}

.quantity-positive {
    color: #198754;
}

/* Price Display */
.price-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Compact Table */
.table-compact {
    font-size: 0.875rem;
}

.table-compact td,
.table-compact th {
    padding: 0.5rem;
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Print Button */
.btn-print {
    background-color: #6c757d;
    color: white;
}

.btn-print:hover {
    background-color: #5a6268;
    color: white;
}

/* Minimal dashboard overrides - keep Bootstrap defaults */
/* Only special avatars keep readable background across themes */
[data-bs-theme="light"] .rounded-circle.bg-light { background-color: #f8f9fa !important; }
[data-bs-theme="dark"] .rounded-circle.bg-light { background-color: #343a40 !important; }

/* Purchase Details - İlişkili Fişler Scroll */
.related-records-container {
    max-height: 300px; /* 5 satır için yaklaşık */
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
}

.related-record-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
  border-radius: 0.25rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.related-record-item:last-child {
    margin-bottom: 0;
}

/* Scroll bar styling */
.related-records-container::-webkit-scrollbar {
    width: 8px;
}

.related-records-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.related-records-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.related-records-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

[data-bs-theme="dark"] .related-records-container {
    background-color: #343a40;
    border-color: #495057;
}

[data-bs-theme="dark"] .related-record-item {
    background-color: #495057;
    border-color: #6c757d;
}


