/* 
 * Narudžbenice - Moderna aplikacija za upravljanje narudžbenicama
 * Svetla tema sa ljubičastim akcentima
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f1f5;
    --text-primary: #1a1a2e;
    --text-secondary: #64648c;
    --text-muted: #9999b0;
    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #06b6d4;
    --border-color: #e2e4eb;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 32px rgba(99, 102, 241, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(16, 185, 129, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Header / Navigation */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0; /* Spreči smanjivanje loga */
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-info));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0; /* Spreči smanjivanje ikone */
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: #ffffff;
    background: var(--accent-primary);
}

/* Navigation dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-family: inherit;
    font-size: inherit;
}

.nav-dropdown-toggle .dropdown-arrow {
    font-size: 0.625rem;
    color: var(--text-muted);
    transition: var(--transition);
    margin-left: auto;
}

.nav-dropdown-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-dropdown.active .nav-dropdown-toggle {
    color: #ffffff;
    background: var(--accent-primary);
}

.nav-dropdown.active .nav-dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
    color: #ffffff;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
    padding: 0.5rem 0;
}

.nav-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-dropdown-item.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

/* User info in navbar */
.nav-user {
    position: relative;
    margin-left: auto; /* Pomeri na kraj */
    padding-left: 1rem;
    border-left: 1px solid var(--border-color);
    flex-shrink: 0; /* Spreči smanjivanje */
}

.user-menu-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.user-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.user-menu-toggle:hover .user-info {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.user-role {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.dropdown-arrow {
    font-size: 0.625rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.user-dropdown.active ~ .user-menu-toggle .dropdown-arrow,
.user-menu-toggle:hover .dropdown-arrow {
    color: var(--text-primary);
}

/* User dropdown menu */
.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 1rem;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.user-dropdown-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.875rem;
}

.user-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--accent-primary);
}

.user-dropdown-item span {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.user-dropdown-item-danger {
    color: var(--accent-danger);
}

.user-dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
}

.logo-text {
    font-weight: 400;
    white-space: nowrap; /* Spreči prelom teksta */
}

.logo-text strong {
    font-weight: 700;
    color: var(--accent-primary);
}

/* Flex wrap */
.flex-wrap {
    flex-wrap: wrap;
}

.actions-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Grid layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Company Cards */
.company-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.company-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
}

.company-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.company-card:nth-child(1) .company-icon { background: linear-gradient(135deg, #6366f1, #818cf8); }
.company-card:nth-child(2) .company-icon { background: linear-gradient(135deg, #10b981, #34d399); }
.company-card:nth-child(3) .company-icon { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.company-card:nth-child(4) .company-icon { background: linear-gradient(135deg, #ef4444, #f87171); }
.company-card:nth-child(5) .company-icon { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.company-card:nth-child(6) .company-icon { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.company-card:nth-child(7) .company-icon { background: linear-gradient(135deg, #ec4899, #f472b6); }
.company-card:nth-child(8) .company-icon { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.company-card:nth-child(9) .company-icon { background: linear-gradient(135deg, #f97316, #fb923c); }

.company-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.company-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--accent-success), #34d399);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--accent-danger), #f87171);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Product Selection */
.product-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}

.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.product-item:last-child {
    border-bottom: none;
}

.product-item:hover {
    background: var(--bg-hover);
}

/* Hover slika proizvoda */
.product-item[data-image]:hover::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 1rem;
    width: 200px;
    height: 200px;
    background-image: var(--product-image);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    z-index: 1000;
    pointer-events: none;
}

.product-item[data-image]:hover::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    margin-left: 1rem;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--border-color);
    z-index: 1001;
    pointer-events: none;
}

.product-item.selected {
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--accent-primary);
}

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.product-name {
    font-weight: 500;
    color: var(--text-primary);
}

.product-stock {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.product-quantity {
    width: 80px;
    padding: 0.5rem;
    text-align: center;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-hover);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

tr:hover td {
    background: var(--bg-hover);
}

tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-kreirana {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.badge-u_obradi {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.badge-zavrsena {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.badge-otkazana {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

/* Search box */
.search-box {
    position: relative;
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: #0e7490;
}

/* Order details */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.order-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.order-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.order-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.card, .company-card, .table-container {
    animation: fadeIn 0.4s ease-out;
}

.company-card:nth-child(1) { animation-delay: 0.05s; }
.company-card:nth-child(2) { animation-delay: 0.1s; }
.company-card:nth-child(3) { animation-delay: 0.15s; }
.company-card:nth-child(4) { animation-delay: 0.2s; }
.company-card:nth-child(5) { animation-delay: 0.25s; }
.company-card:nth-child(6) { animation-delay: 0.3s; }
.company-card:nth-child(7) { animation-delay: 0.35s; }
.company-card:nth-child(8) { animation-delay: 0.4s; }
.company-card:nth-child(9) { animation-delay: 0.45s; }

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

::-webkit-scrollbar-track {
    background: var(--bg-hover);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.align-center { align-items: center; }

/* ============================================
   RESPONSIVE / MOBILE STYLES
   ============================================ */

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
}

/* Tablet - max 992px */
@media (max-width: 992px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-content {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 3;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        order: 4;
        flex-direction: column;
        padding: 1rem 0;
        gap: 0.25rem;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-link {
        padding: 0.875rem 1rem;
        border-radius: var(--radius-sm);
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        margin-top: 0.5rem;
        padding: 0;
        display: none;
    }
    
    .nav-dropdown-menu.active {
        display: block;
    }
    
    .nav-dropdown-item {
        padding: 0.875rem 1.5rem;
    }
    
    .nav-user {
        order: 2;
        margin-left: auto;
        padding-left: 0.5rem;
        border-left: none;
    }
    
    .user-info {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }
    
    .user-role {
        display: none;
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    .user-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: var(--radius) var(--radius) 0 0;
        min-width: auto;
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .logo {
        font-size: 1.25rem;
        flex-shrink: 0; /* Spreči smanjivanje */
    }
    
    .logo-text {
        white-space: nowrap; /* Spreči prelom teksta i na mobilnim */
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        flex-shrink: 0; /* Spreči smanjivanje ikone */
    }
    
    .container {
        padding: 1.5rem 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    /* Order header responsive */
    .order-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .order-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    /* Page header responsive */
    .page-header.d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-header .d-flex {
        flex-wrap: wrap;
    }
}

/* Mobile - max 768px */
@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    .page-title {
        font-size: 1.375rem;
    }
    
    .page-subtitle {
        font-size: 0.875rem;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        margin-top: 0.5rem;
        padding: 0;
        display: none;
    }
    
    .nav-dropdown-menu.active {
        display: block;
    }
    
    .nav-dropdown-item {
        padding: 0.875rem 1.5rem;
    }
    
    /* Cards */
    .card {
        padding: 1rem;
        border-radius: var(--radius-sm);
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm {
        padding: 0.5rem 0.75rem;
        width: auto;
    }
    
    .d-flex.gap-1,
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    
    /* Forms */
    .form-control {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Tables - horizontal scroll */
    .table-container {
        margin: 0 -0.75rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    table {
        min-width: 600px;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Company cards */
    .company-card {
        padding: 1rem;
    }
    
    .company-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Order meta stacked */
    .order-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Actions */
    .actions-section .d-flex {
        flex-direction: column;
    }
    
    .actions-section form {
        width: 100%;
    }
    
    .actions-section form .d-flex {
        flex-direction: column;
    }
    
    .actions-section select.form-control {
        width: 100% !important;
    }
    
    /* Empty state */
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
    
    /* Alerts */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Filter form */
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form select,
    .filter-form .btn {
        width: 100%;
    }
    
    /* Stat boxes */
    .stat {
        font-size: 0.8125rem;
    }
    
    /* Project header */
    .project-header {
        padding: 1.5rem 1rem;
    }
    
    .project-header h1 {
        font-size: 1.5rem;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Gallery */
    .gallery {
        grid-template-columns: 1fr;
    }
    
    /* Contacts grid */
    .contacts-grid,
    .contacts-list {
        grid-template-columns: 1fr;
    }
    
    /* Image grid */
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Lightbox */
    .lightbox img {
        max-width: 95%;
        max-height: 80%;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
}

/* Small mobile - max 480px */
@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .logo {
        font-size: 1rem;
        gap: 0.5rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo-text {
        display: none;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .card {
        padding: 0.875rem;
    }
    
    /* Image grid on very small screens */
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    /* Company card icon */
    .company-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .company-name {
        font-size: 1rem;
    }
    
    /* Buttons stack on very small */
    .d-flex.gap-1 > .btn,
    .d-flex.gap-2 > .btn {
        flex: 1;
        min-width: 0;
    }
    
    /* Badge */
    .badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Map smaller */
    #map {
        height: 200px !important;
    }
}

/* Touch-friendly styles */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .product-item {
        padding: 1rem;
    }
    
    .product-checkbox {
        width: 24px;
        height: 24px;
    }
    
    /* Prevent hover effects on touch */
    .company-card:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Landscape phone orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        position: relative;
    }
    
    .nav-links {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .lightbox {
        padding: 0.5rem;
    }
    
    .lightbox img {
        max-height: 90vh;
    }
}

/* Hide on mobile / Show on desktop */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
}

/* Responsive text alignment */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .container {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
}
