/* Custom CSS for Warehouse Inventory Management System */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* Navbar Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 0.25rem;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

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

/* Dashboard Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-info,
.card.bg-warning {
    color: white;
}

.card.bg-primary .card-title,
.card.bg-success .card-title,
.card.bg-info .card-title,
.card.bg-warning .card-title {
    font-size: 0.9rem;
    opacity: 0.9;
}

.card.bg-primary h3,
.card.bg-success h3,
.card.bg-info h3,
.card.bg-warning h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0;
}

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

.table thead th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.table tbody td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
    border-color: #e9ecef;
}

/* Button Styles */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
}

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #1e7e34);
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger-color), #bd2130);
}

.btn-warning {
    background: linear-gradient(45deg, var(--warning-color), #e0a800);
    color: var(--dark-color);
}

.btn-info {
    background: linear-gradient(45deg, var(--info-color), #117a8b);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

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

/* Modal Styles */
.modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 1rem 1rem 0 0;
    border: none;
}

.modal-title {
    font-weight: 600;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Mobile Modal Fixes */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
    }
    
    .modal-body {
        padding: 1.5rem 1rem;
    }
    
    .modal-body .form-label {
        font-weight: 600 !important;
        color: var(--dark-color) !important;
        margin-bottom: 0.75rem !important;
        font-size: 0.9rem !important;
        display: block !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    .modal-body .form-control,
    .modal-body .form-select {
        margin-bottom: 1rem;
        font-size: 0.95rem;
        padding: 0.875rem;
    }
    
    .modal-body .mb-3 {
        margin-bottom: 1.25rem !important;
    }
    
    .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 100px;
    }
    
    /* Ensure modal is above all content */
    .modal {
        z-index: 1055 !important;
    }
    
    .modal-backdrop {
        z-index: 1050 !important;
    }
    
    /* Fix any potential overlay issues */
    .modal-open .modal {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .modal-body {
        padding: 1rem 0.75rem;
    }
    
    .modal-body .form-label {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
        padding: 0.25rem 0 !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border-radius: 0.25rem !important;
        border-left: 3px solid var(--primary-color) !important;
        padding-left: 0.5rem !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }
    
    .modal-body .form-control,
    .modal-body .form-select {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .modal-body .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* Enhanced z-index for smaller screens */
    .modal {
        z-index: 1060 !important;
    }
    
    .modal-backdrop {
        z-index: 1055 !important;
    }
}

/* Alert Styles */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Section Headers */
.content-section h2 {
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.content-section h2 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        margin: 0.25rem 0;
    }
    
    .card.bg-primary h3,
    .card.bg-success h3,
    .card.bg-info h3,
    .card.bg-warning h3 {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* Chart Container */
canvas {
    max-height: 300px;
}

/* Custom Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Hover Effects for Icons */
.btn i {
    transition: transform 0.2s ease;
}

.btn:hover i {
    transform: scale(1.1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        font-size: 0.8rem;
    }
}

/* Dark Mode Support - Disabled to maintain light theme on all devices */
/* @media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e9ecef;
    }
    
    .card {
        background-color: #2d3748;
        color: #e9ecef;
    }
    
    .table {
        background-color: #2d3748;
        color: #e9ecef;
    }
    
    .table tbody tr:hover {
        background-color: #4a5568;
    }
    
    .form-control,
    .form-select {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e9ecef;
    }
    
    .modal-content {
        background-color: #2d3748;
        color: #e9ecef;
    }
} */

/* Stok İşlemleri (transfer) tablosu — sütun kayması ve uzun metinler */
#transactionsTable {
    table-layout: fixed;
    width: 100%;
}

#transactionsTable thead th,
#transactionsTable tbody td {
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}

