@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e293b;
    --success-color: #10b981;
    --bg-color: #f3f4f6;
    --hover-bg: #e9ecef;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--secondary-color);
    overscroll-behavior-y: none; /* Prepreči "bounce" efekt na iOS */
}

/* --- NAVIGACIJA --- */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
}
.navbar-brand img { height: 35px; width: auto; }
.nav-user-info { font-weight: 600; color: var(--secondary-color); }

/* Jezikovni preklopnik */
.lang-switcher { display: flex; gap: 5px; align-items: center; }
.lang-link {
    text-decoration: none; font-size: 13px; font-weight: 600; padding: 4px 8px;
    border-radius: 4px; background-color: #f1f5f9; color: #64748b;
    border: 1px solid #e2e8f0; transition: all 0.2s;
}
.lang-link:hover, .lang-link.active {
    background-color: var(--primary-color); color: white; border-color: var(--primary-color);
}

/* --- TABELA --- */
.main-card {
    background: white; border-radius: 12px;
    box-shadow: var(--card-shadow); border: none; padding: 2rem; margin-top: 2rem;
}

.table-custom { width: 100%; border-collapse: separate; border-spacing: 0 0.5rem; }
.table-custom thead th {
    background-color: #f8fafc; color: #64748b; font-weight: 600;
    text-transform: uppercase; font-size: 0.85rem; padding: 1rem; border: none;
    white-space: nowrap;
}
.table-custom tbody tr {
    background-color: white; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: background-color 0.2s ease;
}
.table-custom tbody tr:hover { background-color: var(--hover-bg); }
.table-custom td { padding: 1rem; vertical-align: middle; border: none; white-space: nowrap; }
.table-custom td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.table-custom td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

/* Ime izdelka se lomi */
.product-name { white-space: normal !important; min-width: 200px; line-height: 1.4; }

/* --- GUMBI --- */
.btn-custom-primary {
    background-color: var(--primary-color); color: white; border-radius: 8px;
    padding: 0.5rem 1.5rem; font-weight: 500; border: none; transition: background 0.2s;
}
.btn-custom-primary:hover { background-color: #1d4ed8; color: white; }
.btn-custom-outline {
    border: 2px solid #e2e8f0; background: transparent; color: var(--secondary-color);
    border-radius: 8px; font-weight: 600;
}
.btn-added {
    background-color: var(--success-color) !important; color: white !important;
    border-color: var(--success-color) !important; transition: all 0.3s ease;
}
.btn-logout { background-color: #fee2e2; color: #ef4444; font-weight: 600; border: none; }

/* Login */
.login-bg {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-container {
    background: white; padding: 3rem; border-radius: 16px; width: 100%; max-width: 420px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- MOBILNE PRILAGODITVE (Responsive) --- */
@media (max-width: 991px) {
    /* Popravek menija */
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
        position: absolute; /* Lebdeči meni */
        top: 100%; left: 0; right: 0; z-index: 1000;
    }
    .navbar { position: relative; } /* Za pozicioniranje menija */
    .navbar-collapse .d-flex { flex-direction: column; align-items: stretch; gap: 8px; }
    
    .lang-switcher { justify-content: center; margin-bottom: 10px; }
    
    /* Glava in iskalnik */
    .row.align-items-center { flex-direction: column; gap: 15px; }
    .col-md-6 { width: 100%; }
    
    /* Kompaktna tabela za mobitel */
    .table-custom thead th { font-size: 0.7rem; padding: 0.5rem; }
    .table-custom td { font-size: 0.8rem; padding: 0.5rem; }
    
    /* Skrijemo manj pomembne stolpce na zelo majhnih ekranih? 
       Zaenkrat samo pomanjšamo pisavo in razmike */
    
    .product-name { min-width: 140px; font-size: 0.85rem; }
    
    /* Vnosna polja in gumbi v tabeli */
    .quantity-input { width: 50px !important; padding: 0.25rem; font-size: 0.9rem; }
    .btn-sm { padding: 0.3rem 0.5rem; font-size: 0.75rem; }
    
    .py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
}