
/* ============================================
   FleetPanel - Complete Stylesheet
   ============================================ */

/* ---- Dark Mode ---- */
[data-theme="dark"] {
    --primary: hsl(217, 91%, 65%);
    --primary-light: hsl(217, 40%, 20%);
    --primary-dark: hsl(217, 91%, 75%);
    --accent: hsl(151, 55%, 50%);
    --accent-light: hsl(151, 30%, 18%);
    --warning: hsl(38, 92%, 55%);
    --warning-light: hsl(38, 40%, 18%);
    --danger: hsl(0, 84%, 65%);
    --danger-light: hsl(0, 40%, 18%);
    --info: hsl(199, 89%, 55%);
    --info-light: hsl(199, 40%, 18%);
    --bg: hsl(222, 30%, 10%);
    --card: hsl(222, 25%, 14%);
    --sidebar-bg: hsl(222, 47%, 8%);
    --sidebar-hover: hsl(222, 47%, 14%);
    --sidebar-text: hsl(210, 40%, 75%);
    --text: hsl(210, 40%, 92%);
    --text-muted: hsl(220, 9%, 55%);
    --border: hsl(220, 20%, 22%);
    --input-bg: hsl(222, 25%, 18%);
}
[data-theme="dark"] .topbar { background: hsla(222, 25%, 14%, 0.9); }
[data-theme="dark"] thead { background: hsl(222, 25%, 12%); }
[data-theme="dark"] tbody tr:hover { background: hsla(222, 25%, 18%, 0.5); }
[data-theme="dark"] .group-header td { background: hsl(222, 25%, 16%) !important; color: hsl(210, 40%, 75%) !important; }

/* ---- Theme toggle button ---- */
.theme-toggle {
    background: none; border: 1px solid var(--border); border-radius: 10px;
    padding: 8px 10px; font-size: 16px; cursor: pointer; transition: all 0.15s;
}
.theme-toggle:hover { background: var(--bg); }

/* ---- Bulk actions bar ---- */
.bulk-actions-bar { display: flex; align-items: center; gap: 8px; }
.bulk-actions-bar .bulk-count { font-size: 13px; font-weight: 600; color: var(--primary); }

/* ---- Sortable columns ---- */
th[data-sort] { cursor: pointer; user-select: none; position: relative; }
th[data-sort]:hover { color: var(--primary); }
th.sort-asc::after { content: ' ▲'; font-size: 10px; }
th.sort-desc::after { content: ' ▼'; font-size: 10px; }

/* ---- Mobile improvements ---- */
@media (max-width: 480px) {
    .topbar-actions { gap: 4px; }
    table td, table th { white-space: nowrap; }
}

:root {
    --primary: hsl(217, 91%, 60%);
    --primary-light: hsl(217, 91%, 95%);
    --primary-dark: hsl(217, 91%, 45%);
    --accent: hsl(151, 55%, 42%);
    --accent-light: hsl(151, 55%, 92%);
    --warning: hsl(38, 92%, 50%);
    --warning-light: hsl(38, 92%, 92%);
    --danger: hsl(0, 84%, 60%);
    --danger-light: hsl(0, 84%, 94%);
    --info: hsl(199, 89%, 48%);
    --info-light: hsl(199, 89%, 93%);

    --bg: hsl(220, 20%, 97%);
    --card: hsl(0, 0%, 100%);
    --sidebar-bg: hsl(222, 47%, 11%);
    --sidebar-hover: hsl(222, 47%, 16%);
    --sidebar-text: hsl(210, 40%, 85%);
    --text: hsl(222, 47%, 11%);
    --text-muted: hsl(220, 9%, 46%);
    --border: hsl(220, 13%, 91%);
    --input-bg: hsl(0, 0%, 100%);

    --radius: 0.75rem;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);

    --sidebar-width: 256px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* ---- Sidebar ---- */
/* ---- Bočni meni (26.10.2026): grupe, SVG ikone, skupljanje na ikone ---- */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 40;
    border-right: 1px solid hsl(222, 40%, 16%);
    transition: transform 0.25s ease, width 0.2s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
    padding: 0 18px;
    border-bottom: 1px solid hsl(222, 40%, 16%);
    flex-shrink: 0;
}
.sidebar-logo-icon {
    width: 34px; height: 34px;
    flex-shrink: 0;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
}
.sidebar-logo-text { min-width: 0; }
.sidebar-logo-text h1 { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.01em; line-height: 1.2; }
.sidebar-logo-text p  { font-size: 11px; color: hsl(215, 20%, 60%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-nav {
    flex: 1;
    padding: 8px 10px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: hsl(222, 30%, 25%) transparent;
}
.nav-grupa { margin-top: 6px; }
.nav-grupa-naslov {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: hsl(215, 16%, 50%);
    padding: 6px 10px 3px;
    white-space: nowrap;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    height: 34px;
    padding: 0 10px;
    margin: 1px 0;
    border-radius: 6px;
    text-decoration: none;
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.nav-item.active {
    background: hsla(217, 91%, 60%, 0.14);
    color: #fff;
}
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -10px; top: 7px; bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--primary);
}
.nav-item.active .nav-icon { color: hsl(217, 91%, 70%); }
.nav-icon {
    width: 20px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: hsl(215, 20%, 62%);
}
.nav-item:hover .nav-icon { color: #fff; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-broj {
    min-width: 20px; height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}

/* Administracija — sklopiva grupa */
.nav-admin { border-top: 1px solid hsl(222, 40%, 16%); padding-top: 6px; margin-top: 10px; }
.nav-admin > summary { list-style: none; }
.nav-admin > summary::-webkit-details-marker { display: none; }
.nav-strelica { display: flex; color: hsl(215, 16%, 50%); transition: transform 0.15s; }
.nav-admin[open] .nav-strelica { transform: rotate(180deg); }
.nav-podstavka { height: 32px; font-size: 13px; padding-left: 18px; }

/* Dno: korisnik i prečice */
.sidebar-footer {
    flex-shrink: 0;
    padding: 10px;
    border-top: 1px solid hsl(222, 40%, 16%);
    display: flex; flex-direction: column; gap: 8px;
}
.sidebar-korisnik { display: flex; align-items: center; gap: 10px; padding: 2px 4px; min-width: 0; }
.sidebar-avatar {
    width: 32px; height: 32px; flex-shrink: 0;
    border-radius: 50%;
    background: hsl(222, 35%, 22%);
    color: #fff;
    font-size: 13px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}
.sidebar-korisnik-tekst { min-width: 0; }
.sidebar-korisnik-ime { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-korisnik-uloga { font-size: 11px; color: hsl(215, 16%, 55%); }
.sidebar-akcije { display: flex; gap: 4px; }
.sidebar-akcija {
    flex: 1;
    height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
    border: 0;
    background: transparent;
    color: hsl(215, 20%, 62%);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.sidebar-akcija:hover, .sidebar-akcija.active { background: var(--sidebar-hover); color: #fff; }
.sidebar-odjava:hover { background: hsla(0, 84%, 60%, 0.15); color: hsl(0, 84%, 70%); }

/* Skupljen meni: samo ikone, naziv u title tooltipu */
html[data-meni="uzak"] { --sidebar-width: 64px; }
html[data-meni="uzak"] .sidebar-logo { padding: 0 15px; }
html[data-meni="uzak"] .sidebar-logo-text,
html[data-meni="uzak"] .nav-label,
html[data-meni="uzak"] .nav-strelica,
html[data-meni="uzak"] .sidebar-korisnik-tekst { display: none; }
html[data-meni="uzak"] .nav-grupa-naslov { height: 1px; padding: 0; margin: 8px 8px; background: hsl(222, 40%, 18%); font-size: 0; }
html[data-meni="uzak"] .nav-item { justify-content: center; padding: 0; }
html[data-meni="uzak"] .nav-podstavka { display: none; }
/* u uskom meniju podstavke se ne vide — označi samu grupu kad je aktivna stranica u njoj */
html[data-meni="uzak"] .nav-admin:has(.nav-podstavka.active) > summary { background: hsla(217, 91%, 60%, 0.14); color: #fff; }
html[data-meni="uzak"] .nav-broj { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
html[data-meni="uzak"] .sidebar-korisnik { justify-content: center; }
html[data-meni="uzak"] .sidebar-akcije { flex-direction: column; gap: 2px; }
html[data-meni="uzak"] .sidebar-akcija { flex: none; width: 100%; height: 30px; }
html[data-meni="uzak"] .sidebar-korisnik { display: none; }
html[data-meni="uzak"] .sidebar-suzi svg { transform: scaleX(-1); }

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 12px; left: 12px;
    z-index: 50;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

/* ---- Main ---- */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.topbar {
    position: sticky; top: 0; z-index: 20;
    height: 64px;
    background: hsla(0, 0%, 100%, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.topbar-welcome { font-size: 14px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topbar-welcome strong { color: var(--text); }
.topbar-datetime { font-size: 13px; color: var(--text-muted); opacity: 0.8; font-variant-numeric: tabular-nums; }

.topbar-actions {
    display: flex; align-items: center; gap: 8px;
}

.notification-bell {
    position: relative;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.15s;
}
.notification-bell:hover { background: var(--bg); }

.notification-bell .badge {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    font-size: 0;
}

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
}

.content { padding: 24px; }

/* ---- Cards & Stats ---- */
.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 24px; font-weight: 700; }
.page-header p { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s;
}

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

.stat-card-top {
    display: flex; justify-content: space-between; align-items: flex-start;
}

.stat-label { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 700; margin-top: 4px; }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.stat-change { font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.stat-change strong { color: var(--text); }

/* ---- Card component ---- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-title { font-size: 15px; font-weight: 600; }
.card-body { padding: 20px; }

/* ---- Tables ---- */
.table-wrapper { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead { background: var(--bg); }

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:hover { background: hsla(220, 20%, 97%, 0.5); }

/* ---- Badges ---- */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: var(--accent-light); color: var(--accent); }
.badge-warning { background: var(--warning-light); color: hsl(38, 92%, 38%); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-neutral { background: var(--bg); color: var(--text-muted); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

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

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

.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(217, 91%, 60%, 0.15);
}

select.form-control { appearance: none; cursor: pointer; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---- Search bar ---- */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 12px center no-repeat;
    transition: border-color 0.15s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ---- Grid layouts ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }

/* ---- Expiration list ---- */
.expiration-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: var(--bg);
    margin-bottom: 8px;
    transition: background 0.15s;
}

.expiration-item:hover { background: var(--border); }

.expiration-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.expiration-info { flex: 1; min-width: 0; }
.expiration-info .vehicle { font-size: 14px; font-weight: 500; }
.expiration-info .type { font-size: 12px; color: var(--text-muted); }
.expiration-date { text-align: right; flex-shrink: 0; }
.expiration-date .date { font-size: 14px; font-weight: 500; }
.expiration-date .days { font-size: 12px; font-weight: 600; }

/* ---- Activity timeline ---- */
.activity-item { display: flex; gap: 12px; padding-bottom: 16px; }

.activity-dot-col {
    display: flex; flex-direction: column; align-items: center;
}

.activity-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
}

.activity-line {
    width: 1px; flex: 1;
    background: var(--border);
    margin-top: 4px;
}

.activity-content .action { font-size: 14px; font-weight: 500; }
.activity-content .detail { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.activity-content .time { font-size: 11px; color: var(--text-muted); opacity: 0.6; margin-top: 4px; }

/* ---- Chart containers ---- */
.chart-container {
    position: relative;
    height: 260px;
    width: 100%;
}

/* ---- Login page ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sidebar-bg);
}

.login-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card h1 { font-size: 24px; text-align: center; margin-bottom: 8px; }
.login-card p { font-size: 14px; text-align: center; color: var(--text-muted); margin-bottom: 32px; }

.login-card .form-group { margin-bottom: 20px; }

.login-card .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    justify-content: center;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-danger { background: var(--danger-light); color: var(--danger); }
.alert-success { background: var(--accent-light); color: var(--accent); }

/* ---- Modal ---- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
}

.modal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 { font-size: 18px; font-weight: 600; }

.modal-close {
    background: none; border: none;
    font-size: 20px; cursor: pointer;
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: flex; }
    html[data-meni="uzak"] { --sidebar-width: 256px; }
    html[data-meni="uzak"] .sidebar-logo-text, html[data-meni="uzak"] .nav-label, html[data-meni="uzak"] .sidebar-korisnik-tekst { display: block; }
    html[data-meni="uzak"] .nav-item { justify-content: flex-start; padding: 0 10px; }
    html[data-meni="uzak"] .nav-grupa-naslov { height: auto; background: none; font-size: 10.5px; padding: 6px 10px 4px; margin: 0; }
    html[data-meni="uzak"] .nav-podstavka { display: flex; }
    html[data-meni="uzak"] .sidebar-akcije { flex-direction: row; }
    .sidebar-suzi { display: none; }
    .sidebar { box-shadow: 0 0 40px rgba(0,0,0,0.35); }
    .main-wrapper { margin-left: 0; }
    .topbar-welcome { display: none; }
    .page-header { flex-direction: column; align-items: flex-start !important; gap: 12px; }
    .page-header .btn-group { width: 100%; }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .content { padding: 16px; }
    .search-bar { flex-direction: column; align-items: stretch; }
    .topbar { padding: 0 12px; height: 56px; }
    .card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .btn-group { flex-wrap: wrap; }
    .btn-group .btn { flex: 1; min-width: 0; justify-content: center; font-size: 12px; }
    table { font-size: 13px; }
    th, td { padding: 8px 10px; }
    .pn-detail-grid { grid-template-columns: 1fr; }
    .pn-summary-grid { grid-template-columns: 1fr; }
    .modal { margin: 12px; max-width: calc(100% - 24px); }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 24px; }
    .stat-icon { width: 36px; height: 36px; font-size: 16px; }
    .content { padding: 12px; }
    .page-header h2 { font-size: 20px; }
    .btn { padding: 6px 10px; font-size: 13px; }
    .form-control { padding: 8px 10px; font-size: 13px; }
    .warning-item { flex-wrap: wrap; }
    .warning-badge { width: 100%; text-align: right; }
    .expiration-item { flex-wrap: wrap; gap: 8px; }
    .expiration-date { width: 100%; text-align: left; }
    /* Hide less important columns on mobile */
    .hide-mobile { display: none; }
}

/* ---- Print styles ---- */
@media print {
    body { background: #fff; font-size: 12px; }
    .sidebar, .sidebar-toggle, .topbar, .no-print,
    .search-bar, .btn, .nav-item, .modal-overlay { display: none !important; }
    .main-wrapper { margin-left: 0 !important; }
    .content { padding: 0 !important; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    .card-header { background: #f5f5f5 !important; }
    .stat-card { box-shadow: none; border: 1px solid #ddd; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    table { font-size: 11px; }
    th { background: #f0f0f0 !important; }
    .badge-status { border: 1px solid #ccc; }
    .chart-container, canvas { max-height: 200px; }

    /* Print header */
    .print-header { display: block !important; text-align: center; margin-bottom: 16px; border-bottom: 2px solid #333; padding-bottom: 8px; }
    .print-header h1 { font-size: 18px; margin: 0; }
    .print-header p { font-size: 11px; color: #666; margin: 4px 0 0; }

    /* Putni nalog print */
    .putni-nalog-print { display: block !important; }
    .putni-nalog-print table { width: 100%; margin-bottom: 12px; }
    .putni-nalog-print .signature-row { display: flex; justify-content: space-between; margin-top: 48px; }
    .putni-nalog-print .signature-line { width: 200px; border-top: 1px solid #333; text-align: center; padding-top: 4px; font-size: 11px; }

    @page { margin: 15mm; size: A4; }
}

.print-header { display: none; }
.putni-nalog-print { display: none; }

/* ---- Putni nalog details ---- */
.pn-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pn-detail-item { padding: 10px 14px; background: var(--bg); border-radius: 8px; }
.pn-detail-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.pn-detail-value { font-size: 15px; font-weight: 600; margin-top: 2px; }
.pn-summary { background: var(--primary-light); border: 1px solid var(--primary); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.pn-summary-title { font-size: 14px; font-weight: 600; color: var(--primary-dark); margin-bottom: 12px; }
.pn-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pn-summary-item .label { font-size: 12px; color: var(--text-muted); }
.pn-summary-item .value { font-size: 20px; font-weight: 700; color: var(--primary-dark); }

/* ---- Warnings ---- */
.warning-section { margin-bottom: 16px; }
.warning-section:last-child { margin-bottom: 0; }
.warning-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.warning-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 10px; margin-bottom: 6px;
    background: var(--bg); transition: background 0.15s;
}
.warning-item:hover { background: var(--border); }
.warning-critical { border-left: 3px solid var(--danger); }
.warning-moderate { border-left: 3px solid var(--warning); }
.warning-info { border-left: 3px solid var(--info); }
.warning-icon { font-size: 16px; flex-shrink: 0; }
.warning-text { flex: 1; font-size: 14px; }
.warning-text strong { font-weight: 600; }
.warning-badge { font-size: 13px; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }

/* ---- Pagination ---- */
.pagination {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; flex-wrap: wrap; gap: 12px;
}
.pagination-info { font-size: 13px; color: var(--text-muted); }
.pagination-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pagination-dots { padding: 0 6px; color: var(--text-muted); }

/* ---- Progress bar ---- */
.progress-bar-container {
    width: 100%; height: 8px; background: var(--bg);
    border-radius: 4px; overflow: hidden;
}
.progress-bar-fill {
    height: 100%; background: var(--primary);
    border-radius: 4px; transition: width 0.3s ease;
}

/* ---- Export/Action buttons ---- */
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: hsl(151, 55%, 35%); }

/* ---- Language Selector (header) ---- */
.lang-selector {
    position: relative;
    display: inline-block;
}
.lang-current {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.lang-current:hover { background: var(--bg); }
.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 100;
    min-width: 140px;
    overflow: hidden;
}
.lang-selector.open .lang-dropdown { display: block; }
.lang-option {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.1s;
}
.lang-option:hover { background: var(--bg); }
.lang-option.lang-active { background: var(--primary-light); font-weight: 600; }

/* ---- Language Selector (login page) ---- */
.lang-login-selector {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}
.lang-login-btn {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    transition: all 0.15s;
}
.lang-login-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-login-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ---- Drag & Drop Upload Zone ---- */
.dropzone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg);
}
.dropzone:hover, .dropzone-active {
    border-color: var(--primary);
    background: hsl(var(--primary-hsl, 217, 91%, 60%) / 0.05);
}
.dropzone-active {
    border-style: solid;
    box-shadow: 0 0 0 3px hsl(217 91% 60% / 0.15);
}
.dropzone-content { pointer-events: none; }
.dropzone-icon { font-size: 36px; margin-bottom: 8px; }
.dropzone-text { display: flex; flex-direction: column; gap: 2px; }
.dropzone-text strong { font-size: 15px; color: var(--text); }
.dropzone-text span { font-size: 13px; color: var(--text-muted); }
.dropzone-info { font-size: 11px; color: var(--text-muted); margin-top: 8px; opacity: 0.7; }
.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.dropzone-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.dropzone-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.dropzone-file-icon { font-size: 24px; }
.dropzone-file-details { display: flex; flex-direction: column; min-width: 0; }
.dropzone-file-details strong {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dropzone-file-details small { font-size: 11px; color: var(--text-muted); }

/* ---- Upload Progress Bar ---- */
.upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.upload-progress-track {
    flex: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.15s ease;
}
.upload-progress-bar.complete {
    background: var(--accent);
}
.upload-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    min-width: 40px;
    text-align: right;
}
.upload-progress-status {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}
.upload-progress .btn-cancel {
    padding: 4px 8px;
    font-size: 12px;
    background: var(--danger-light);
    color: var(--danger);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}
.upload-progress .btn-cancel:hover {
    background: var(--danger);
    color: #fff;
}
