/* Hlavné štýly */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Sidebar štýly */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #343a40;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #ced4da;
    padding: 0.75rem 1rem;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
}

/* Dashboard karty */
.dashboard-card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* Tabuľky */
.table-responsive {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.03);
}

/* Inventory položky */
.inventory-item-row {
    transition: background-color 0.2s ease-in-out;
}

.inventory-item-row:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.inventory-item-changed {
    animation: highlight 2s ease-in-out;
}

@keyframes highlight {
    0% { background-color: #fff7e6; }
    50% { background-color: #ffe0b2; }
    100% { background-color: transparent; }
}

/* Farebné rozlíšenie kategórií v inventúre - výraznejšie farby */
.category-0 { background-color: #e6f0ff !important; }
.category-1 { background-color: #f0f0f0 !important; }
.category-2 { background-color: #fff2cc !important; }
.category-3 { background-color: #e6ffe6 !important; }
.category-4 { background-color: #ffe6e6 !important; }
.category-5 { background-color: #e6ffff !important; }
.category-6 { background-color: #f9e6d2 !important; }
.category-7 { background-color: #e6e6ff !important; }

/* Pri hover zachováme odlíšenie ale stmavíme pozadie */
.category-0:hover { background-color: #cce0ff !important; }
.category-1:hover { background-color: #e0e0e0 !important; }
.category-2:hover { background-color: #ffe699 !important; }
.category-3:hover { background-color: #ccffcc !important; }
.category-4:hover { background-color: #ffcccc !important; }
.category-5:hover { background-color: #ccffff !important; }
.category-6:hover { background-color: #f0cba7 !important; }
.category-7:hover { background-color: #ccccff !important; }

/* Formuláre */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: #1976D2;
    border-color: #1976D2;
}

.btn-primary:hover {
    background-color: #1565C0;
    border-color: #1565C0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Alerty */
.alert {
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

/* Login stránka */
.login-container {
    max-width: 500px;
    margin: 10% auto;
    padding: 30px;
    background-color: #343a40;
    color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    max-width: 200px;
    margin-bottom: 1rem;
}

/* Dark mode input fields */
.form-control.bg-dark {
    background-color: #212529 !important;
    border-color: #495057 !important;
    color: #f8f9fa !important;
}

.form-control.bg-dark:focus {
    background-color: #2b3035 !important;
    color: #f8f9fa !important;
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Karty pre objednávky podľa dodávateľov */
.supplier-order-card {
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.supplier-order-card .card-header {
    font-weight: 600;
    padding: 1rem;
}

/* Loader */
.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responzívne úpravy */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobilná verzia pre inventúru */
    #inventory-items-table th,
    #inventory-items-table td {
        white-space: nowrap;
    }
    
    #inventory-items-table td input {
        width: 80px !important;
        font-size: 16px !important; /* Zabráni priblíženiu na iOS pri kliknutí */
    }
    
    /* Zjednodušený pohľad na mobiloch */
    .mobile-hidden {
        display: none;
    }
    
    /* Fixné tlačidlá na spodku mobilnej obrazovky */
    .mobile-fixed-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    /* Zväčšené tlačidlá pre dotykové zariadenia */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    /* Zväčšené vstupné polia pre dotykové zariadenia */
    input, select, textarea {
        font-size: 16px !important; /* Zabráni priblíženiu na iOS */
        height: auto !important;
        padding: 10px !important;
    }
}

/* Ošetrenie pre mobilný pohľad na inventúrne položky */
.mobile-inventory-item {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    position: relative;
}

.mobile-inventory-item .item-header {
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.mobile-inventory-item .item-category {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.mobile-inventory-item .item-body {
    display: flex;
    margin-bottom: 10px;
}

.mobile-inventory-item .item-body div {
    margin-right: 15px;
}

.mobile-inventory-item .item-quantity {
    display: flex;
    align-items: center;
}

.mobile-inventory-item .btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
}
