/* ============================================================
   CRM GUME — Glavni CSS (Mobile-First, Responsive, Optimiziran)
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
                 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica',
                 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main, .main-content, .container {
    flex: 1;
    padding-bottom: 80px;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1rem;
}

/* ============================================================
   TIPOGRAFIJA
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p { margin-bottom: 1rem; }

a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover { color: #0b5ed7; }

/* ============================================================
   DUGMIĆI
   ============================================================ */

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    user-select: none;
}

.btn--primary {
    background-color: #0d6efd;
    color: white;
}

.btn--primary:hover {
    background-color: #0b5ed7;
}

.btn--secondary {
    background-color: #6c757d;
    color: white;
}

.btn--secondary:hover {
    background-color: #5c636a;
}

.btn--success {
    background-color: #198754;
    color: white;
}

.btn--success:hover {
    background-color: #157347;
}

.btn--danger {
    background-color: #dc3545;
    color: white;
}

.btn--danger:hover {
    background-color: #bb2d3b;
}

.btn--outline {
    background-color: transparent;
    color: #0d6efd;
    border: 1px solid #0d6efd;
}

.btn--outline:hover {
    background-color: #0d6efd;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   FORME
   ============================================================ */

.form-card {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form {
    background: white;
    padding: 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form__group {
    margin-bottom: 1rem;
}

.form__label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control:disabled {
    background-color: #e9ecef;
    color: #6c757d;
}

/* Multi-select */
.form-control[multiple] {
    padding: 0.5rem;
    min-height: 120px;
}

.form-control[multiple] option {
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.25rem;
}

.form-control[multiple] option:checked {
    background: #0d6efd;
    color: white;
    font-weight: 500;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.form__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.form__grid--2col {
    grid-template-columns: 1fr;
}

.form__grid--3col {
    grid-template-columns: 1fr;
}

.form__grid--4col {
    grid-template-columns: 1fr;
}

.form__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-direction: column;
}

.form__actions .btn {
    width: 100%;
}

/* ============================================================
   FILTER BAR
   ============================================================ */

.filter-bar {
    background: white;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.filter-bar__inner {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-bar__search {
    flex: 1;
    min-width: 100%;
}

.filter-bar__select {
    flex: 1;
    min-width: 100%;
}

.filter-bar__inner .btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* ============================================================
   SKENARIO: Čekanj Učitavanja
   ============================================================ */

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.2em solid #f3f3f3;
    border-top: 0.2em solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================================
   ALERT / OBAVIJESTI
   ============================================================ */

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    border-left: 4px solid;
    font-size: 0.875rem;
}

.alert--success {
    background-color: #d1e7dd;
    border-color: #198754;
    color: #0f5132;
}

.alert--danger, .alert--error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #842029;
}

.alert--warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #664d03;
}

.alert--info {
    background-color: #cfe2ff;
    border-color: #0d6efd;
    color: #084298;
}

.alert--close {
    float: right;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    color: inherit;
    opacity: 0.7;
}

.alert--close:hover {
    opacity: 1;
}

/* ============================================================
   STRANICA: ZAGLAVLJE
   ============================================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.kanban-col {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.kanban-col__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.kanban-col__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
}

.kanban-col__count {
    background: rgba(0,0,0,0.08);
    color: #333;
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.kanban-col__cards {
    flex: 1;
    display: grid;
    gap: 0.75rem;
    min-height: 1px;
    padding: 0.25rem 0.25rem 0.1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.kanban-col__cards--over {
    background-color: rgba(13, 110, 253, 0.08);
}

.kanban-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    padding: 0.9rem 1rem;
    border-left: 4px solid #0d6efd;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    cursor: grab;
}

.kanban-card--dragging {
    opacity: 0.65;
    transform: scale(0.98);
}

.kanban-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.kanban-card__name {
    font-weight: 700;
    color: #0d6efd;
    display: block;
    line-height: 1.25;
}

.kanban-card__meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #555;
}

.kanban-card__date {
    font-size: 0.82rem;
    color: #495057;
    padding: 0.45rem 0.65rem;
    border-radius: 0.55rem;
    background: #f8f9fa;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.kanban-card__date--KASNI {
    color: #b02a37;
    background: #f8d7da;
}

.kanban-card__date--DANAS {
    color: #664d03;
    background: #fff3cd;
}

.kanban-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kanban-card__prob {
    font-size: 0.78rem;
    color: #0d6efd;
    font-weight: 700;
}

.kanban-card__footer .badge {
    margin: 0;
}

.page-header__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 200px;
}

.page-header__count {
    font-size: 1rem;
    color: #666;
}

.page-header__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-header__actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* ============================================================
   KARTICA / CARD (DESKTOP)
   ============================================================ */

.card {
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card__header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.card__body {
    padding: 1rem;
}

.card__footer {
    padding: 1rem;
    border-top: 1px solid #eee;
    background-color: #f8f9fa;
}

/* ============================================================
   TABELA (DESKTOP SAMO)
   ============================================================ */

.table-wrapper {
    overflow-x: auto;
    display: none;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.875rem;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
}

.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.table tr:hover {
    background-color: #f8f9fa;
}

/* ============================================================
   MOBILNE KARTICE ZA KUPCE
   ============================================================ */

.hidden-mobile {
    display: none;
}

.visible-mobile {
    display: block;
}

.hidden-desktop {
    display: block;
}

.visible-desktop {
    display: none;
}

.customer-list-mobile,
.customer-cards {
    display: grid;
    gap: 1rem;
}

/* Stari stilovi - .customer-card */
.customer-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border-left: 4px solid #0d6efd;
    text-align: center;
}

.customer-card__header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.customer-card__name {
    font-weight: 600;
    font-size: 1rem;
    color: #0d6efd;
    word-break: break-word;
    text-align: center;
}

.customer-card__meta {
    display: flex;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.customer-card__date {
    font-size: 0.8rem;
    color: #666;
    margin: 0.5rem 0;
    padding: 0.25rem 0;
    text-align: center;
}

.customer-card__date--overdue {
    color: #dc3545;
    font-weight: 600;
}

.customer-card__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    justify-content: center;
}

.customer-card__actions a,
.customer-card__actions button {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 0.5rem;
    text-align: center;
    border-radius: 0.375rem;
    background: #0d6efd;
    color: white;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.customer-card__actions a:hover,
.customer-card__actions button:hover {
    background: #0b5ed7;
}

/* Novi stilovi - .customer-card-mobile */
.customer-card-mobile {
    background: white;
    border-radius: 0.375rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border-left: 4px solid #0d6efd;
}

.customer-card-mobile__title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #0d6efd;
    word-break: break-word;
}

.customer-card-mobile__row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.customer-card-mobile__label {
    color: #666;
    font-weight: 500;
    min-width: 40%;
}

.customer-card-mobile__value {
    color: #333;
    text-align: right;
    flex: 1;
    font-weight: 500;
    word-break: break-word;
}

.customer-card-mobile__badges {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.customer-card-mobile__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.customer-card-mobile__actions a,
.customer-card-mobile__actions button {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 0.5rem;
    text-align: center;
    border-radius: 0.375rem;
    background: #0d6efd;
    color: white;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.customer-card-mobile__actions a:hover,
.customer-card-mobile__actions button:hover {
    background: #0b5ed7;
}

/* ============================================================
   KANBAN KOLON
   ============================================================ */

.kanban {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    padding-bottom: 1rem;
}

.kanban__column {
    flex: 0 0 280px;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.75rem;
}

.kanban__header {
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.kanban__badge {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.kanban__card {
    background: white;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    cursor: grab;
    user-select: none;
}

.kanban__card:active {
    cursor: grabbing;
    opacity: 0.8;
}

.kanban__card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.kanban__card-meta {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

/* ============================================================
   MOBILNI DONJI NAVIGACEI BAR
   ============================================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    height: 70px;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.5rem;
    flex: 1;
    color: #666;
    text-decoration: none;
    font-size: 0.65rem;
    transition: all 0.2s;
    border-top: 3px solid transparent;
    position: relative;
}

.bottom-nav__item:active {
    background-color: #f0f0f0;
}

.bottom-nav__item--active {
    color: #0d6efd;
    border-top-color: #0d6efd;
}

.bottom-nav__icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* Notifikacijski badge */
.notif-sup {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: bold;
}

/* ============================================================
   BADGE
   ============================================================ */

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.badge--primary { background-color: #cfe2ff; color: #084298; }
.badge--secondary { background-color: #e2e3e5; color: #41464b; }
.badge--success { background-color: #d1e7dd; color: #0f5132; }
.badge--danger { background-color: #f8d7da; color: #842029; }
.badge--pcr { background-color: #d1e7dd; color: #0f5132; }
.badge--tbr { background-color: #cfe2ff; color: #084298; }
.badge--otr { background-color: #fff3cd; color: #664d03; }
.badge--kombi { background-color: #f8d7da; color: #842029; }
.badge--fortress { background-color: #ffc107; color: #000; }

/* ============================================================
   UTILITI KLASE
   ============================================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; }
.flex-around { justify-content: space-around; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 2rem; }

.text-muted { color: #6c757d; }
.text-primary { color: #0d6efd; }
.text-success { color: #198754; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }

/* ============================================================
   DODATNE KLASE — Stage Pills, Cells, etc.
   ============================================================ */

.stage-pill {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    color: white;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.stage-pill--sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
}

.date-cell {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.8rem;
}

.date-cell--overdue {
    background: #ffebee;
    color: #c62828;
}

.cell-sub {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.actions-cell {
    display: flex;
    gap: 0.25rem;
}

.btn--xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
}

.btn--sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.link--strong {
    font-weight: 600;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.pagination__btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #0d6efd;
    transition: all 0.2s;
}

.pagination__btn:hover {
    background: #0d6efd;
    color: white;
}

.pagination__info {
    font-size: 0.875rem;
    color: #666;
}

.row--fortress {
    background-color: #fffaf0;
}

/* ============================================================
   DATA TABLE
   ============================================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.875rem;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}
   ============================================================ */

.fab {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 1rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    font-size: 1.5rem;
    text-align: center;
    line-height: 60px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.6);
    z-index: 900;
    transition: all 0.2s;
}

.fab:hover {
    background: #0b5ed7;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.8);
    transform: scale(1.1);
}

@media (max-width: 767px) {
    .fab {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background-color: #1f2e3d;
    color: white;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s;
    display: none;
    flex-direction: column;
}

.sidebar__brand {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid #2c3e50;
    gap: 0.35rem;
    flex-shrink: 0;
    text-align: center;
}

.sidebar__logo {
    display: block;
    width: 100%;
    max-width: none;
    height: 130px;
    background: #fff;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}

.sidebar__brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #fff;
}

.sidebar__brand-subtitle {
    font-size: 0.7rem;
    color: #8fa3b8;
    letter-spacing: 0.4px;
    text-align: center;
    line-height: 1.3;
}

.sidebar__nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

.sidebar__item {
    padding: 0;
    margin: 0;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: #e2e8f0;
    text-decoration: none;
    transition: background-color 0.15s, border-left-color 0.15s;
    border-left: 4px solid transparent;
    font-size: 0.95rem;
}

.sidebar__link:hover {
    background-color: #2a3d50;
    color: #fff;
}

.sidebar__item--active .sidebar__link {
    background-color: #0d6efd;
    border-left-color: #4e95ff;
    color: #fff;
    font-weight: 600;
}

.sidebar__icon {
    font-size: 1.1rem;
    min-width: 22px;
    text-align: center;
}

.sidebar__footer {
    flex-shrink: 0;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid #2c3e50;
    background: #19242f;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-align: center;
}

.sidebar__user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    width: 100%;
}

.sidebar__user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    text-align: center;
    word-break: break-word;
}

.sidebar__user-role {
    font-size: 0.7rem;
    color: #9aa9ba;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.sidebar__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #dc3545;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.sidebar__logout:hover { background: #b02a37; color: #fff; }

.sidebar__logout { font-size: 0; }
.sidebar__logout::before { content: '🚪'; font-size: 1rem; margin-right: 0.35rem; }
.sidebar__logout::after { content: 'Odjava'; font-size: 0.85rem; }

/* ============================================================
   RESPONSIVNE BREAKPOINTS
   ============================================================ */

@media (min-width: 600px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .form__grid--2col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form__grid--3col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-control[multiple] {
        min-height: 150px;
    }
    
    .filter-bar__search,
    .filter-bar__select {
        min-width: 150px;
        flex: 0 1 auto;
    }
    
    .form__actions {
        flex-direction: row;
    }
    
    .form__actions .btn {
        width: auto;
    }
    
    .customer-card-mobile__actions {
        flex-wrap: nowrap;
    }
    
    .customer-card-mobile__actions a,
    .customer-card-mobile__actions button {
        min-width: auto;
    }
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
    
    main, .main-content, .container {
        padding-bottom: 0;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .hidden-mobile {
        display: block !important;
    }
    
    .visible-mobile {
        display: none !important;
    }
    
    .table-wrapper {
        display: block;
    }
    
    .customer-list-mobile {
        display: none;
    }
    
    .page-header {
        flex-wrap: nowrap;
    }
    
    .form__grid--2col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form__grid--3col {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form__grid--4col {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .filter-bar__inner {
        flex-wrap: nowrap;
    }
    
    .filter-bar__search,
    .filter-bar__select {
        min-width: auto;
        flex: 0 1 auto;
    }
}

@media (min-width: 992px) {
    .sidebar {
        display: flex;
        transform: translateX(0);
    }

    main, .main-content {
        margin-left: 250px;
    }

    .container {
        max-width: 1400px;
        margin: 0 auto;
        margin-left: 250px;
        padding: 2rem;
    }
}

/* Mobile — sidebar kao drawer (svaki je otvoren kad ima --open) */
@media (max-width: 991px) {
    .sidebar {
        z-index: 2100;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .sidebar.sidebar--open {
        display: flex;
        transform: translateX(0);
    }
    .sidebar__brand { padding: 0 0 0.5rem; }
    .sidebar__logo  { height: 90px; }
    .sidebar__link  { padding: 0.65rem 1.25rem; font-size: 0.92rem; }
    .sidebar__footer { padding: 0.65rem 0.85rem 0.85rem; }
}

/* Backdrop iza drawer-a */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}
.sidebar-backdrop--open {
    opacity: 1;
    visibility: visible;
}
@media (min-width: 992px) {
    .sidebar-backdrop { display: none; }
}

/* Bottom nav "Više" dugme */
.bottom-nav__more {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

/* ============================================================
   CPK — Cijena po 1000 km (istaknuto)
   ============================================================ */

.price-1000km-col {
    background: #fff3cd;
    color: #664d03;
}

.price-1000km-cell {
    background: #fff9e6;
    color: #664d03;
    font-size: 1.05rem;
    text-align: right;
    white-space: nowrap;
}

.price-1000km-cell strong {
    color: #b7791f;
    font-size: 1.1rem;
}

/* ============================================================
   Plan vs Realizacija — novi čisti dashboard
   ============================================================ */

.plan-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1rem 0 1.5rem 0;
}

.plan-kpi {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.25rem;
    position: relative;
    min-height: 110px;
}

.plan-kpi--accent { border-left: 4px solid #2e73e8; }

.plan-kpi__label {
    font-size: 0.72rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    text-align: center;
}

.plan-kpi__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
    text-align: center;
}

.plan-kpi__unit {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
}

.plan-kpi__badge {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
    align-self: center;
}

.plan-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.plan-section__title {
    margin: 0 0 1rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
}

/* ---- Reps cards ---- */
.plan-reps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.plan-rep {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: center;
    align-items: center;
}

.plan-rep__head { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; width: 100%; }
.plan-rep__name { font-weight: 700; color: #111827; font-size: 1rem; text-align: center; }
.plan-rep__team { font-size: 0.7rem; color: #9ca3af; text-transform: uppercase; text-align: center; }

.plan-rep__pct-row { display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.plan-rep__pct {
    font-size: 1.3rem;
    font-weight: 800;
    padding: 0.15rem 0.6rem;
    border-radius: 6px;
}
.plan-rep__pct-label { font-size: 0.72rem; color: #6b7280; }

.plan-rep__bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.plan-rep__bar-fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
.plan-rep__bar-fill--success { background: #28a745; }
.plan-rep__bar-fill--info    { background: #2e73e8; }
.plan-rep__bar-fill--warning { background: #ffc107; }
.plan-rep__bar-fill--danger  { background: #dc3545; }

.plan-rep__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.75rem;
    font-size: 0.78rem;
    width: 100%;
}
.plan-rep__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.4rem 0.3rem;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 6px;
}
.plan-rep__stat-label { color: #9ca3af; font-size: 0.66rem; text-transform: uppercase; margin-bottom: 0.2rem; }
.plan-rep__stat-value { color: #111827; font-weight: 700; font-size: 0.88rem; }
.plan-rep__stat-pct { color: #6b7280; font-weight: 500; font-size: 0.72rem; }

.plan-rep__bar { width: 100%; }

/* ---- Program tiles ---- */
.plan-programs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.plan-program {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.85rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.plan-program__name { font-weight: 700; color: #111827; font-size: 1rem; text-align: center; }
.plan-program__pct {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 1.1rem;
    font-weight: 700;
}
.plan-program__stats { font-size: 0.78rem; display: flex; flex-direction: column; gap: 0.3rem; width: 100%; text-align: center; }
.plan-program__row {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.plan-program__row span { color: #6b7280; font-size: 0.72rem; text-transform: uppercase; }
.plan-program__row strong { font-size: 0.92rem; }

/* ---- Charts ---- */
.plan-charts-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.chart-box {
    position: relative;
    height: 280px;
    width: 100%;
}
.chart-box--small { height: 240px; max-width: 380px; margin: 0 auto; }

/* ---- Details tables ---- */
.plan-details {
    margin-top: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.plan-details__summary {
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
    color: #1f2937;
    font-size: 0.95rem;
    list-style: none;
    user-select: none;
}
.plan-details__summary::-webkit-details-marker { display: none; }
.plan-details__summary::before { content: '▶ '; color: #9ca3af; font-size: 0.8rem; }
.plan-details[open] > .plan-details__summary::before { content: '▼ '; }

.plan-details[open] > .plan-details__summary { border-bottom: 1px solid #e5e7eb; background: #fff; border-radius: 8px 8px 0 0; }

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

.plan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 640px;
}

.plan-table th {
    padding: 0.5rem 0.6rem;
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
}

.plan-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.plan-table__rep {
    font-weight: 600;
    background: #fafbfc;
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 1;
}

.plan-table__cell { text-align: right; vertical-align: middle; min-width: 70px; }
.plan-table__val  { font-weight: 500; font-size: 0.78rem; }
.plan-table__pct {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.08rem 0.35rem;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 2px;
}
.plan-table__pct--success { background: #d4edda; color: #155724; }
.plan-table__pct--info    { background: #d4e5fb; color: #1f6feb; }
.plan-table__pct--warning { background: #fff3cd; color: #856404; }
.plan-table__pct--danger  { background: #f8d7da; color: #721c24; }

/* Badge info variant */
.badge--info { background: #d4e5fb; color: #1f6feb; }

/* ============================================================
   CPK Mjerenje — detalji
   ============================================================ */
.detail-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.detail-card--accent     { border-left: 4px solid #2e73e8; }
.detail-card--competitor { border-left: 4px solid #dc3545; background: #fff5f5; }

.detail-card__title {
    margin: 0 0 1rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
}

.detail-note {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fafbfc;
    border: 1px solid #eef0f3;
    border-radius: 8px;
}

.detail-note dt {
    color: #6b7280;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.detail-note dd {
    margin: 0;
    color: #111827;
    font-size: 0.95rem;
    white-space: pre-wrap;
    line-height: 1.45;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem 1rem;
    margin: 0;
    align-items: stretch;
}

.detail-grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 0.65rem 0.5rem;
    background: #fafbfc;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    min-height: 72px;
}

.detail-grid > div.highlight {
    background: #fff9e6;
    border: 1px dashed #f6c97a;
    grid-column: span 2;
    min-height: 80px;
    justify-content: center;
}

.detail-grid dt {
    color: #6b7280;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
    margin-bottom: 0.4rem;
    text-align: center;
    line-height: 1.25;
}
.detail-grid dd {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
    .detail-grid > div { min-height: 64px; padding: 0.5rem 0.4rem; }
    .detail-grid > div.highlight { grid-column: span 2; }
    .detail-grid dt { font-size: 0.65rem; }
    .detail-grid dd { font-size: 0.92rem; }
}

.comparison-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
}

.comparison-result--success { background: #d4edda; color: #155724; }
.comparison-result--danger  { background: #f8d7da; color: #721c24; }
.comparison-result--secondary { background: #e9ecef; color: #495057; }

.comparison-result__pct { font-size: 2rem; font-weight: 800; }
.comparison-result__label { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

@media (max-width: 600px) {
    .detail-card { padding: 0.85rem; }
    .comparison-result__pct { font-size: 1.5rem; }
}

/* ====== Responzivno ====== */
@media (max-width: 900px) {
    .plan-kpis        { grid-template-columns: repeat(2, 1fr); }
    .plan-programs    { grid-template-columns: repeat(2, 1fr); }
    .plan-charts-2col { grid-template-columns: 1fr; }
    .plan-reps        { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .plan-section { padding: 0.75rem; border-radius: 8px; }
    .plan-section__title { font-size: 0.95rem; }

    .plan-kpis     { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .plan-kpi { padding: 0.7rem; min-height: 90px; }
    .plan-kpi__value { font-size: 1.15rem; }
    .plan-kpi__label { font-size: 0.62rem; }

    .plan-reps { grid-template-columns: 1fr; gap: 0.55rem; }
    .plan-rep  { padding: 0.7rem; }
    .plan-rep__pct { font-size: 1.1rem; }
    .plan-rep__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .plan-programs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .plan-program  { padding: 0.7rem; }

    .chart-box { height: 230px; }
    .chart-box--small { height: 220px; }

    .plan-table { font-size: 0.72rem; min-width: 520px; }
    .plan-table th, .plan-table td { padding: 0.3rem 0.4rem; }
    .plan-table__val  { font-size: 0.72rem; }
    .plan-table__pct  { font-size: 0.62rem; }

    .page-header { flex-direction: column; gap: 0.5rem; align-items: stretch; }
    .filter-bar__inner { flex-wrap: wrap; gap: 0.4rem; }
    .filter-bar__select { flex: 1 1 140px; min-width: 0; }
}

@media (max-width: 420px) {
    .plan-kpis      { grid-template-columns: 1fr; }
    .plan-programs  { grid-template-columns: 1fr; }
    .plan-kpi__value { font-size: 1.1rem; }
}

.data-table--compact th,
.data-table--compact td {
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
    white-space: nowrap;
}

.data-table--compact .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

.table-wrapper--scroll {
    overflow-x: auto;
    max-width: 100%;
}

/* ============================================================
   Login stranica
   ============================================================ */

body.auth-layout {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #1f2e3d 0%, #2c3e50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.login-page {
    width: 100%;
    max-width: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
    padding: 2rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    text-align: center;
}

.login-card__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    margin: -1.25rem -1.5rem 0;
    width: calc(100% + 3rem);
}

.login-card__brand-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    display: block;
    object-fit: contain;
    padding: 0.5rem 0;
}

.login-card__title-block {
    text-align: center;
    width: 100%;
    border-top: 2px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb;
    padding: 0.85rem 0 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.login-card__title {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 900;
    color: #0d6efd;
    letter-spacing: 3px;
    text-align: center;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(13, 110, 253, 0.15);
}

.login-card__subtitle {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
}

.login-card__tyres {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.25rem 0;
}

.login-card__triangle-logo {
    height: 70px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.login-form .form-group { margin: 0; text-align: left; }
.login-form .form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form .form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: #f9fafb;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #2e73e8;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 115, 232, 0.15);
}

.login-form .input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.login-form .input-group .form-control { padding-right: 2.5rem; }
.login-form .input-group__btn {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.35rem;
    opacity: 0.6;
}
.login-form .input-group__btn:hover { opacity: 1; }

.login-card__submit {
    width: 100%;
    padding: 0.85rem 1rem;
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 0.3rem;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}
.login-card__submit:hover { background: #0b5ed7; }
.login-card__submit:active { transform: translateY(1px); }

.login-card__footer {
    font-size: 0.72rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 0.3rem;
}

.login-card .alert {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
}
.login-card .alert--error, .login-card .alert--danger { background: #f8d7da; color: #721c24; }
.login-card .alert--success { background: #d4edda; color: #155724; }
.login-card .alert--info { background: #d4e5fb; color: #1f6feb; }

@media (max-width: 600px) {
    .login-page { max-width: 100%; }
    .login-card { padding: 1.25rem 1.1rem 1.2rem; gap: 0.85rem; border-radius: 14px; }
    .login-card__brand { margin: -1.25rem -1.1rem 0; width: calc(100% + 2.2rem); }
    .login-card__brand-logo { max-height: 150px; }
    .login-card__title { font-size: 1.6rem; letter-spacing: 2px; }
    .login-card__subtitle { font-size: 0.7rem; }
    .login-card__triangle-logo { height: 50px; max-width: 160px; }
    .login-form .form-control { font-size: 0.92rem; padding: 0.6rem 0.8rem; }
    .login-card__submit { font-size: 0.9rem; padding: 0.7rem 1rem; }
}
