.agk {
    --agk-accent: #1C69D4;
    --agk-accent-soft: #E8F0FF;
    --agk-ink: #282828;
    --agk-text: #292929;
    --agk-muted: #636363;
    --agk-line: #E2E5EA;
    --agk-bg: #fff;
    --agk-soft: #F6F7F9;
    display: block;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--agk-text);
    font-family: inherit;
}
.agk *, .agk *::before, .agk *::after { box-sizing: border-box; }

/* ---------- Brand bar (svetla, da se logoi jasno vide) ---------- */
.agk__brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 22px 28px;
    background: #fff;
    border-top: 4px solid var(--agk-accent);
    border-left: 1px solid var(--agk-line);
    border-right: 1px solid var(--agk-line);
    border-bottom: 1px solid var(--agk-line);
}
.agk__logos { display: flex; align-items: center; gap: 22px; }
.agk__logo { display: block; height: 38px; width: auto; object-fit: contain; }
.agk__logo--ag { height: 26px; }
.agk__logo-sep { width: 1px; height: 32px; background: var(--agk-line); }
.agk__logo-fallback { color: var(--agk-ink); font-weight: 600; font-size: 20px; letter-spacing: .01em; }
.agk__brandmeta { text-align: right; }
.agk__eyebrow {
    display: block;
    color: var(--agk-muted);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.agk__title { color: var(--agk-ink) !important; margin: 4px 0 0; font-size: 20px; }

/* ---------- Layout ---------- */
.agk__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 0;
    border: 1px solid var(--agk-line);
    border-top: none;
    background: var(--agk-bg);
}
.agk__form { padding: 28px; }
.agk__result {
    padding: 28px;
    background: var(--agk-soft);
    border-left: 1px solid var(--agk-line);
    align-self: start;
    position: sticky;
    top: 20px;
}

/* ---------- Form blocks ---------- */
.agk__block { border: none; margin: 0 0 28px; padding: 0; }
.agk__block:last-child { margin-bottom: 0; }
.agk__legend {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0 0 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--agk-line);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--agk-ink);
    text-transform: uppercase;
}
.agk__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: var(--agk-accent);
    color: #fff;
    font-size: 13px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.agk__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
}
.agk__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.agk__field--wide { grid-column: 1 / -1; }
.agk__label { font-size: 13px; font-weight: 500; color: var(--agk-muted); }
.agk__field input:not([type=checkbox]),
.agk__field select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--agk-line);
    border-radius: 0;
    background: #fff;
    color: var(--agk-ink);
    font-family: inherit;
    font-size: 16px;
    transition: border-color .18s ease, box-shadow .18s ease;
    appearance: none;
}
.agk__field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23636363' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}
.agk__field input:focus,
.agk__field select:focus {
    outline: none;
    border-color: var(--agk-accent);
    box-shadow: 0 0 0 3px var(--agk-accent-soft);
}
.agk__field--check {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    height: 46px;
    align-self: end;
}
.agk__field--check input { width: 20px; height: 20px; accent-color: var(--agk-accent); flex: 0 0 auto; }
.agk__field--check .agk__label { color: var(--agk-ink); font-weight: 500; }
.agk__hint { font-size: 12px; color: var(--agk-accent); min-height: 14px; font-weight: 600; }

.agk__req { color: #FF3F3F; font-weight: 700; }
.agk__field--invalid input { border-color: #FF3F3F !important; box-shadow: 0 0 0 3px rgba(255, 63, 63, .12) !important; }
.agk__field--invalid .agk__label { color: #FF3F3F; }

/* ---------- Izbor vozila (combobox) ---------- */
.agk__vehicle { position: relative; }
.agk__vehicle .agk__hint { color: var(--agk-muted); font-weight: 400; margin-top: 2px; }
.agk__combo { position: relative; }
.agk__combo-input {
    width: 100%;
    height: 46px;
    padding: 0 40px 0 40px;
    border: 1px solid var(--agk-line);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231C69D4' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4-4'/%3E%3C/svg%3E") no-repeat 13px center;
    color: var(--agk-ink);
    font-family: inherit;
    font-size: 16px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.agk__combo-input:focus { outline: none; border-color: var(--agk-accent); box-shadow: 0 0 0 3px var(--agk-accent-soft); }
.agk__combo-clear {
    position: absolute; top: 0; right: 0;
    width: 40px; height: 46px;
    background: none; border: none; cursor: pointer;
    font-size: 22px; line-height: 1; color: var(--agk-muted);
}
.agk__combo-clear:hover { color: var(--agk-ink); }
.agk__combo-list {
    position: absolute;
    top: calc(100% + 4px); left: 0; right: 0;
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--agk-line);
    box-shadow: 0 12px 28px rgba(20,25,40,.12);
}
.agk__combo-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: #fff;
    border: none;
    border-bottom: 1px solid var(--agk-line);
    cursor: pointer;
    font-family: inherit;
}
.agk__combo-item:last-child { border-bottom: none; }
.agk__combo-item:hover, .agk__combo-item.is-active { background: var(--agk-accent-soft); }
.agk__combo-item-title { font-size: 14px; font-weight: 600; color: var(--agk-ink); }
.agk__combo-item-meta { font-size: 12px; color: var(--agk-muted); }

/* ---------- Zaključano vozilo (single strana) ---------- */
.agk__picked {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--agk-accent-soft);
    border-left: 3px solid var(--agk-accent);
}
.agk__picked-badge {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--agk-accent);
    padding: 4px 10px;
}
.agk__picked-label { font-size: 15px; font-weight: 600; color: var(--agk-ink); }

.agk__readonly {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--agk-line);
    background: var(--agk-soft);
    color: var(--agk-ink);
    font-size: 16px;
    font-weight: 500;
}
.agk__readonly::before {
    content: "";
    width: 14px; height: 14px;
    flex: 0 0 auto;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23636363' stroke-width='2'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

/* ---------- Result panel ---------- */
.agk__result-head {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 2px solid var(--agk-ink);
}
.agk__result-eyebrow {
    display: block;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--agk-muted);
}
.agk__rata {
    display: block;
    margin: 6px 0 4px;
    font-size: 40px;
    line-height: 1.05;
    font-weight: 700;
    color: var(--agk-ink);
    letter-spacing: -.01em;
}
.agk__result-sub { font-size: 13px; color: var(--agk-muted); }
.agk__result-sub [data-out] { color: var(--agk-ink); font-weight: 600; }

.agk__summary { margin: 0; }
.agk__summary > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--agk-line);
}
.agk__summary dt { margin: 0; font-size: 14px; color: var(--agk-muted); }
.agk__summary dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--agk-ink); white-space: nowrap; }
.agk__summary-strong dt { color: var(--agk-ink); font-weight: 600; }
.agk__summary-strong dd { color: var(--agk-accent); }
.agk__summary--small dt, .agk__summary--small dd { font-size: 13px; }

.agk__summary--final { margin-top: 14px; padding-top: 6px; border-top: 2px solid var(--agk-ink); }
.agk__summary--final .agk__summary-strong dt { max-width: 62%; line-height: 1.3; }
.agk__summary--final .agk__summary-strong dd { color: var(--agk-accent); font-size: 17px; }

.agk__troskovi { margin: 14px 0 4px; }
.agk__troskovi summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--agk-ink);
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    list-style: none;
}
.agk__troskovi summary::-webkit-details-marker { display: none; }
.agk__troskovi summary::after { content: "＋"; color: var(--agk-accent); }
.agk__troskovi[open] summary::after { content: "－"; }
.agk__troskovi summary [data-out] { color: var(--agk-accent); }

/* ---------- Actions ---------- */
.agk__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.agk__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.agk__btn--pdf { background: var(--agk-accent); color: #fff; }
.agk__btn--pdf:hover { background: var(--agk-ink); }
.agk__btn--pdf[disabled] { opacity: .6; cursor: progress; }
.agk__btn--ghost { background: transparent; color: var(--agk-ink); border-color: var(--agk-line); }
.agk__btn--ghost:hover { border-color: var(--agk-ink); }

.agk__note { margin: 18px 0 0; font-size: 12px; color: var(--agk-muted); line-height: 1.5; }
.agk__note strong { color: var(--agk-ink); }

/* ---------- Plan modal ---------- */
.agk__modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12,13,22,.55);
}
.agk__modal[hidden] { display: none; }
.agk__modal-box {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: 86vh;
    overflow: auto;
    background: #fff;
    padding: 28px;
    border-top: 4px solid var(--agk-accent);
}
.agk__modal-close {
    position: absolute;
    top: 14px; right: 16px;
    background: none; border: none;
    font-size: 30px; line-height: 1;
    color: var(--agk-muted); cursor: pointer;
}
.agk__modal-title { margin: 0 0 18px; font-size: 22px; color: var(--agk-ink); }
.agk__table-wrap { overflow-x: auto; }
.agk__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.agk__table th, .agk__table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--agk-line); white-space: nowrap; }
.agk__table th { background: var(--agk-soft); color: var(--agk-muted); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.agk__table th:first-child, .agk__table td:first-child,
.agk__table th:nth-child(2), .agk__table td:nth-child(2) { text-align: left; }
.agk__table tbody tr:hover { background: var(--agk-accent-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .agk__grid { grid-template-columns: 1fr; }
    .agk__result { border-left: none; border-top: 1px solid var(--agk-line); position: static; }
}
@media (max-width: 560px) {
    .agk__fields { grid-template-columns: 1fr; }
    .agk__brandbar { flex-direction: column; align-items: flex-start; }
    .agk__brandmeta { text-align: left; }
    .agk__rata { font-size: 34px; }
}
