/* TexTrack Pro - Custom Styles */

/* Ultra güçlü tab gizleme kuralları - Bootstrap inline stillerini ezer */
.nav-tabs .nav-item.d-none,
.nav-tabs .nav-item.hidden-tab,
.nav-tabs .nav-item[style*="display"],
.nav-tabs li.d-none,
.nav-tabs li.hidden-tab,
.nav-tabs li[style*="display"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -10000px !important;
    z-index: -1 !important;
}

/* Bootstrap inline style savaşı - çok spesifik selectors */
.nav-tabs .nav-item[style*="display: block"] {
    display: none !important;
}

.nav-tabs .nav-item[style*="display:block"] {
    display: none !important;
}

/* Tab content gizleme */
.tab-pane.d-none,
.tab-pane.hidden-tab,
.tab-pane[style*="display: none"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Spesifik ID'ler için kurallar */
li:has(#band-1-tab.d-none),
li:has(#band-2-tab.d-none),
li:has(#band-3-tab.d-none),
li:has(#band-4-tab.d-none),
li:has(#accessory-approval-tab.d-none) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -10000px !important;
}

:root {
    --primary-color: #6f42c1;
    --primary-light: #8b5cf6;
    --primary-dark: #5a2d91;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Loading Spinner */
#loadingSpinner {
    z-index: 9999 !important;
    top: 0;
    left: 0;
}

/* Login Modal z-index fix */
.modal {
    z-index: 9998 !important;
}

.modal-backdrop {
    z-index: 9997 !important;
}

/* Bootstrap color overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.navbar-brand {
    font-weight: 600;
}

/* Card styles */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Model cards */
.model-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.model-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Status badges */
.status-badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.status-aktif {
    background-color: var(--success-color);
}

.status-beklemede {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.status-tamamlandi {
    background-color: var(--info-color);
    color: var(--dark-color);
}

/* Progress bars */
.progress {
    height: 0.75rem;
    border-radius: 0.375rem;
}

.progress-bar {
    background-color: var(--primary-color);
}

/* Table styles */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table thead {
    background-color: var(--light-color);
}

/* Form styles */
.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .model-card {
        margin-bottom: 1rem;
    }
    
    .offcanvas {
        width: 280px;
    }
}

/* Sidebar styles */
.list-group-item {
    border: none;
    padding: 0.75rem 1rem;
}

.list-group-item:hover {
    background-color: var(--light-color);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Dashboard cards */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

.dashboard-card.success {
    border-left-color: var(--success-color);
}

.dashboard-card.warning {
    border-left-color: var(--warning-color);
}

.dashboard-card.danger {
    border-left-color: var(--danger-color);
}

.dashboard-card.info {
    border-left-color: var(--info-color);
}

/* Icon styles */
.icon-lg {
    font-size: 2rem;
}

.icon-xl {
    font-size: 3rem;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Modal styles */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: var(--light-color);
}

/* Quantity display styles */
.quantity-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: var(--light-color);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.quantity-label {
    font-weight: 600;
    color: var(--dark-color);
}

.quantity-value {
    font-weight: 700;
    color: var(--primary-color);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Raporlama ve Üretim Takibi Sayfaları */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.page-header h1 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Report Stats Cards */
.card .text-center h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Progress bars */
.progress {
    background-color: #e9ecef;
    border-radius: 0.375rem;
}

.progress-bar {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Production table styles */
#productionTable .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.65rem;
}

/* Status badge colors */
.status-badge.status-active {
    background-color: var(--success-color);
    color: white;
}

.status-badge.status-pending {
    background-color: var(--warning-color);
    color: #212529;
}

.status-badge.status-completed {
    background-color: var(--info-color);
    color: #212529;
}

.status-badge.status-cancelled {
    background-color: var(--danger-color);
    color: white;
}

/* Form group spacing */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Button group styling */
.btn-group .btn {
    margin-right: 0;
}

/* Table responsive improvements */
.table-responsive {
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
    border-top: none;
}

.table td {
    vertical-align: middle;
}

/* Modal improvements */
.modal-lg {
    max-width: 900px;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

/* Chart container */
#reportChart {
    max-height: 400px;
}

/* Production tracking specific */
.badge-lg {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Timeline Styles for Repair Details */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-marker.bg-primary {
    background-color: var(--primary-color) !important;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-marker.bg-warning {
    background-color: var(--warning-color) !important;
    box-shadow: 0 0 0 2px var(--warning-color);
}

.timeline-marker.bg-success {
    background-color: var(--success-color) !important;
    box-shadow: 0 0 0 2px var(--success-color);
}

.timeline-content {
    padding-left: 0.5rem;
}

.timeline-content p {
    margin-bottom: 0.25rem;
}

.timeline-content small {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Modal enhancements */
.modal-dialog.modal-lg {
    max-width: 900px;
}

.table-borderless td {
    border: none !important;
    padding: 0.25rem 0.5rem;
}

.table-borderless td:first-child {
    width: 40%;
    font-weight: 500;
}

/* Priority and status badges */
.badge.bg-urgent {
    background-color: var(--danger-color) !important;
}

.badge.bg-high {
    background-color: var(--warning-color) !important;
    color: var(--dark-color) !important;
}

.badge.bg-normal {
    background-color: var(--secondary-color) !important;
}

/* Form enhancements */
.form-select:focus,
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

/* ===================== ÇEKİ LİSTESİ STİLLERİ ===================== */

.packing-box {
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f0f8ff 100%);
    transition: all 0.3s ease;
    position: relative;
}

.packing-box:hover {
    border-color: #bbdefb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.packing-box .box-number {
    color: #1976d2;
    font-weight: 700;
}

.size-details-container {
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.size-row {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.size-row:last-child {
    border-bottom: none;
}

.box-total {
    color: #2e7d32;
    font-weight: 600;
}

/* Koli numaralandırma */
.packing-box::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 4px;
    background: linear-gradient(90deg, #1976d2, #42a5f5);
    border-radius: 12px 12px 0 0;
}

/* Buton stilleri */
.btn-outline-success {
    border-color: #28a745;
    color: #28a745;
}

.btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

/* Form input'ları için özel stiller */
.packing-box input[type="text"],
.packing-box input[type="number"] {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.packing-box input[type="text"]:focus,
.packing-box input[type="number"]:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

/* Animasyonlar */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.packing-box,
.size-row {
    animation: slideInUp 0.3s ease-out;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .packing-box {
        padding: 15px;
    }
    
    .size-row .row > div {
        margin-bottom: 10px;
    }
}