/* nftel — čitljiv radni interfejs, bez biblioteka i spoljnih fontova. */
:root {
    color-scheme: light;
    --ink: #15334f;
    --text: #243746;
    --muted: #526474;
    --primary: #16643b;
    --primary-hover: #0e4d2c;
    --green: #43b66a;
    --surface: #f2f5f7;
    --line: #cfd9df;
    --sidebar-width: 264px;
    --radius: 8px;
    --section-gap: 28px;
    --card-pad: 26px;
}
* { box-sizing: border-box; }
html { line-height: 1.55; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; color: var(--text); background: var(--surface); font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; max-width: 100%; }
button, a, input, select, textarea { touch-action: manipulation; }
a { color: #174e7a; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #0b3658; text-decoration-thickness: 2px; }
:is(a, button, summary):focus-visible { outline: 3px solid #167147; outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
h1, h2, h3, p { margin-top: 0; }
h1 { color: var(--ink); font-size: 32px; line-height: 1.2; letter-spacing: -.6px; font-weight: 700; margin-bottom: 10px; overflow-wrap: anywhere; }
h2 { color: var(--ink); font-size: 21px; line-height: 1.35; letter-spacing: -.2px; margin-bottom: 22px; font-weight: 650; }
h3 { color: var(--ink); font-size: 18px; margin: 26px 0 16px; }
p { margin-bottom: 18px; }
small { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 5px; }
strong { font-weight: 650; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 150; padding: 12px 18px; background: var(--ink); color: white; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); color: white; }
.workspace { min-height: 100dvh; margin-left: var(--sidebar-width); display: flex; flex-direction: column; }
.sidebar { width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; z-index: 60; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); }
.sidebar-brand { display: flex; justify-content: center; align-items: start; gap: 12px; padding: 28px 24px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.brand { display: flex; flex-direction: column; align-items: center; min-width: 0; text-decoration: none; color: var(--ink); }
.brand-logo { display: flex; align-items: center; justify-content: center; width: 200px; max-width: 100%; padding: 8px; background: #fff; }
.brand-logo img { display: block; width: 100%; height: auto; object-fit: contain; }
.brand-caption { color: var(--ink); font-size: 15px; font-weight: 650; margin-top: 12px; }
.main-nav { flex: 1; overflow: auto; padding: 24px 14px; scrollbar-width: thin; scrollbar-color: #a7b8c3 transparent; }
.nav-group { margin-bottom: 28px; }
.nav-group:last-child { margin-bottom: 0; }
.nav-group-label { font-size: 12px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); padding: 0 14px; margin-bottom: 10px; }
.main-nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 11px 14px; margin-bottom: 3px; border-radius: 5px; border-left: 3px solid transparent; color: #344b5d; font-size: 15px; font-weight: 500; text-decoration: none; }
.main-nav a > .icon { width: 20px; height: 20px; color: #587082; }
.main-nav a:hover { background: #edf2f5; color: var(--ink); }
.main-nav a[aria-current] { border-left-color: var(--primary); background: #e6f3e9; color: #124f2d; font-weight: 700; }
.main-nav a[aria-current] > .icon { color: var(--primary); }
.nav-current-dot { display: none; }
.sidebar-footer { display: flex; align-items: start; gap: 10px; border-top: 1px solid var(--line); padding: 18px 26px; color: var(--ink); font-size: 13px; }
.sidebar-footer small { font-size: 12px; margin-top: 2px; }
.system-dot { display: inline-block; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.site-header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; padding: 18px 36px; background: #fff; border-bottom: 1px solid var(--line); }
.header-leading, .header-account { display: flex; align-items: center; gap: 20px; min-width: 0; }
.header-context { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.header-kicker { color: var(--muted); }
.header-kicker::after { content: '/'; color: #8b9ba6; margin-left: 12px; }
.header-section { font-weight: 650; color: var(--ink); }
.header-date { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.header-date .icon { width: 18px; height: 18px; }
.account-identity { padding-left: 20px; border-left: 1px solid var(--line); }
.session { color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.account-identity small { font-size: 12px; margin: 1px 0 0; }
.site-header form { margin: 0; }
button.icon-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 10px; background: #fff; border: 1px solid #bac9d3; border-radius: 5px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
button.icon-button:hover, .icon-button:hover { background: #eaf2ed; color: var(--primary); border-color: var(--primary); }
button.logout-button { width: auto; gap: 8px; padding: 10px 12px; font-size: 14px; }
button.nav-toggle, button.sidebar-close { display: none; }
button.nav-backdrop, button.nav-backdrop:hover, button.nav-backdrop:focus, button.nav-backdrop:active { position: fixed; inset: 0; z-index: 55; border: 0; border-radius: 0; padding: 0; background: #122a3b80; box-shadow: none; }
main { width: 100%; max-width: 1800px; margin: 0 auto; padding: 36px; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--section-gap); }
main:focus { outline: none; }
main > * { margin-block: 0; }
main > .breadcrumbs { margin-bottom: -10px; }
main > dialog:not([open]) { display: none; }
.site-footer { max-width: 1800px; width: 100%; margin: 0 auto; padding: 4px 36px 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }
.footer-divider { color: #8b9ba6; margin: 0 8px; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.page-heading > div:first-child { min-width: 0; }
.page-heading p:last-child, .section-heading h2, .section-heading p:last-child { margin-bottom: 0; }
.page-heading .muted, .page-heading > div > p:last-child { max-width: 760px; font-size: 16px; }
.page-heading > form { flex-shrink: 0; margin: 0; }
.page-heading > .actions, .section-heading > .actions { margin: 0; }
.section-heading { margin-bottom: 24px; }
.section-heading p { font-size: 14px; margin: 7px 0 0; }
.section-heading .eyebrow { margin: 0 0 6px; }
.eyebrow { text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.muted { color: var(--muted); }
.text-warning { color: #875000; }
.text-danger { color: #a12222; }
.text-action { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--primary); font-size: 14px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.text-action .icon { width: 18px; height: 18px; }
.grid { display: grid; gap: 24px; min-width: 0; align-items: start; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > .card { margin: 0; min-width: 0; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--card-pad); min-width: 0; }
.card > :last-child { margin-bottom: 0; }
.card > .table-wrap { margin-left: calc(-1 * var(--card-pad)); margin-right: calc(-1 * var(--card-pad)); border-left: 0; border-right: 0; border-radius: 0; }
.card > .table-wrap:last-child { margin-bottom: calc(-1 * var(--card-pad)); border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
/* Jedan sistem razmaka za sve stranice detalja, uključujući mreže kartica. */
.detail-stack { display: flex; flex-direction: column; gap: var(--section-gap); min-width: 0; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.stats .card { text-decoration: none; color: var(--text); }
.stat-card { display: flex; flex-direction: column; padding: 22px; border-top: 3px solid #b9c9d4; }
.stat-card:hover { border-color: #668899; background: #fafcfd; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stat-top > span { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat-top > .icon { color: #466476; }
.stats strong { display: block; margin: 18px 0; color: var(--ink); font-size: 34px; line-height: 1.2; letter-spacing: -.7px; font-variant-numeric: tabular-nums; }
.stats .stat-money { font-size: clamp(22px, 1.8vw, 30px); letter-spacing: -.5px; white-space: nowrap; }
.stat-unit { font-size: 14px; letter-spacing: 0; font-weight: 400; margin-left: 7px; color: var(--muted); }
.stat-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--muted); }
.stat-bottom > .icon { width: 18px; height: 18px; }
.stat-primary { border-top-color: var(--primary); background: #edf6ef; }
.stat-primary:hover { background: #e4f2e8; border-color: var(--primary); }
.stat-primary .stat-top > span, .stat-primary .stat-top > .icon { color: #155532; }
.stats.grid.dashboard-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dashboard-stats > .stat-card { grid-column: span 2; }
.dashboard-stats > .stat-card:nth-last-child(-n+2) { grid-column: span 3; }
.stat-attention { border-top-color: #a2651a; background: #fff9ee; }
.stat-attention .stat-top > span, .stat-attention .stat-top > .icon, .stat-attention .stat-bottom { color: #754600; }
@media (min-width: 1600px) {
    .stats.grid.dashboard-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .dashboard-stats > .stat-card, .dashboard-stats > .stat-card:nth-last-child(-n+2) { grid-column: auto; }
}
@media (max-width: 1100px) {
    .stats.grid.dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-stats > .stat-card, .dashboard-stats > .stat-card:nth-last-child(-n+2) { grid-column: auto; }
    .dashboard-stats > .stat-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .stats.grid.dashboard-stats { grid-template-columns: 1fr; }
}
.heading-with-count { display: flex; align-items: center; gap: 12px; }
.count-badge, .section-count { display: inline-flex; justify-content: center; align-items: center; min-width: 30px; min-height: 28px; padding: 2px 8px; border-radius: 4px; color: #174c2f; background: #e4f1e8; font-size: 14px; font-weight: 650; vertical-align: middle; margin-left: 6px; }
.queue-card { padding-bottom: 0; overflow: hidden; }
.queue-card > .table-wrap { border-bottom: 0; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; line-height: 1.55; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 17px 18px; border-bottom: 1px solid #dfe6eb; vertical-align: middle; }
th:first-child, td:first-child { padding-left: var(--card-pad); }
th:last-child, td:last-child { padding-right: var(--card-pad); }
th { font-size: 13px; font-weight: 650; color: #3c5364; background: #edf2f5; padding-top: 14px; padding-bottom: 14px; white-space: nowrap; }
th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; min-height: 24px; }
th a:hover { color: #123e60; text-decoration: underline; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: #124e2c; background: #e6eee9; }
.sort-link:not(:has(span))::after { content: '↕'; color: #4f6675; font-size: 15px; }
tbody tr:nth-child(even) { background: #fafcfd; }
tbody tr:hover { background: #edf5f1; }
tbody td small { max-width: 360px; }
td > br:has(+small), td > small + br { display: none; }
tbody td > a { font-weight: 550; }
tfoot tr { background: #e9f2ec; }
tfoot th, tfoot td { font-size: 15px; font-weight: 650; color: var(--ink); background: #e9f2ec; border-top: 2px solid #9eb4a8; padding-top: 18px; padding-bottom: 18px; }
.table-wrap { overflow: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; scrollbar-color: #8da2b0 #edf2f5; scrollbar-width: auto; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap + p, .table-wrap + .muted { margin-top: 18px; font-size: 14px; }
.amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amount strong { color: var(--ink); }
.record-title { color: var(--ink); font-weight: 650; text-decoration: underline; text-decoration-color: #a4b8c7; }
.record-title:hover { text-decoration-color: currentColor; }
.date-value { white-space: nowrap; color: var(--text); }
.period-cell { white-space: nowrap; font-size: 14px; }
.queue-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 12px; min-height: 40px; border: 1px solid #9dbda9; border-radius: 5px; background: #edf6ef; color: #12522f; font-size: 14px; font-weight: 650; white-space: nowrap; text-decoration: none; }
.queue-action:hover { background: #dcefe2; color: #104728; }
.queue-action > .icon { width: 17px; height: 17px; }
.queue-action.is-send { color: #1b4d73; border-color: #a1bacb; background: #edf4f9; }
.work-period-inline { display: none; }
.billing-work-table .queue-action, .billing-work-table .badge { white-space: normal; }
.billing-work-table .queue-action { max-width: 100%; text-align: center; }
@media (max-width: 1440px) {
    .billing-work-table .period-column { display: none; }
    .billing-work-table .work-period-inline { display: block; }
    .billing-work-table th, .billing-work-table td { padding-inline: 14px; }
    .billing-work-table th { white-space: normal; }
    .billing-work-table .amount small { white-space: normal; }
}
@media (min-width: 901px) and (max-width: 1440px) {
    .billing-work-table { table-layout: fixed; }
    .billing-work-table th:nth-child(1) { width: 16%; }
    .billing-work-table th:nth-child(2) { width: 14%; }
    .billing-work-table th:nth-child(3) { width: 22%; }
    .billing-work-table th:nth-child(5) { width: 12%; }
    .billing-work-table th:nth-child(6) { width: 20%; }
    .billing-work-table th:nth-child(7) { width: 16%; }
    .billing-work-table td:nth-child(3) { overflow-wrap: anywhere; }
    .billing-work-table .queue-action { width: 100%; }
}
.queue-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sync-status { display: inline-flex; align-items: center; gap: 8px; }
.sync-status > .system-dot { margin: 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 9px; border: 1px solid #c9d5dc; border-radius: 4px; color: #3d5668; background: #f1f5f7; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge .icon { width: 15px; height: 15px; }
.badge.active, .badge.success, .badge.paid { color: #13532d; border-color: #a6cbb3; background: #e6f3e9; }
.badge.inactive, .badge.cancelled { color: #495b68; border-color: #cdd7de; background: #edf1f4; }
.badge.warning, .badge.pending { color: #754700; border-color: #d9bd83; background: #fff5dc; }
.badge.danger, .badge.overdue { color: #962020; border-color: #d8a4a4; background: #fff0ed; }
.badge.neutral { color: #3c5364; background: #edf2f5; }
.empty, .empty-state { padding: 30px 26px; text-align: center; color: var(--muted); font-size: 15px; }
.empty strong, .empty-state strong { display: block; color: var(--ink); font-size: 17px; margin: 10px 0 6px; }
.empty > span { display: block; }
.empty-icon { width: 36px; height: 36px; padding: 7px; color: var(--primary); background: #e6f3e9; border-radius: 50%; }
.empty.compact { padding: 26px 12px; }
.compact-empty { padding: 20px 22px; text-align: left; border: 1px dashed #b8c8d2; border-radius: 5px; background: #f6f9fb; }
.compact-empty strong { margin-top: 0; }
.compact-empty p { margin: 6px 0 0; font-size: 14px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 17px; margin: 0; border: 1px solid var(--primary); border-radius: 5px; background: var(--primary); color: #fff; font-size: 15px; line-height: 1.4; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; }
button:hover, .button:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; text-decoration: none; }
button > .icon, .button > .icon { width: 19px; height: 19px; }
.secondary, button.secondary { background: #fff; color: #23475e; border-color: #aebfc9; }
.secondary:hover, button.secondary:hover { background: #eaf1f5; color: #15384f; border-color: #607d90; }
.danger, button.danger { background: #fff; color: #9c2424; border-color: #ceaaaa; }
.danger:hover, button.danger:hover { background: #fff0ed; color: #8c1616; border-color: #af6363; }
.link { background: none; border: 0; padding: 8px 0; color: #174e7a; text-decoration: underline; }
.link:hover { color: #0b3658; background: none; }
button:disabled { opacity: .65; cursor: default; }
label { display: flex; flex-direction: column; gap: 8px; color: #344d60; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid #aabcc8; border-radius: 5px; background: #fff; color: var(--text); line-height: 1.4; font-size: 16px; font-weight: 400; }
input::placeholder, textarea::placeholder { color: #637582; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #647e90; }
input:focus, select:focus, textarea:focus { border-color: #167147; box-shadow: 0 0 0 3px #16714726; outline: none; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--primary); flex-shrink: 0; }
label:has(>input[type=checkbox]), label:has(>input[type=radio]), .checkbox { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; }
input:read-only, input:disabled, select:disabled { color: #4b6170; background: #edf2f5; }
input[type=file] { padding: 7px; font-size: 14px; }
input[type=file]::file-selector-button { padding: 7px 10px; border: 1px solid #b6c6d0; border-radius: 3px; background: #edf2f5; color: var(--ink); margin-right: 12px; cursor: pointer; font: inherit; }
textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.form-grid label { min-width: 0; }
.wide, [data-price-pair] { grid-column: 1/-1; }
[data-price-pair] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; padding: 22px; background: #f0f6f2; border: 1px solid #b9d0c1; border-radius: 6px; }
[data-price-pair] > p, [data-price-pair] > small, [data-price-pair] > .wide { grid-column: 1/-1; margin: 0; }
.filters, .actions, .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.filters { align-items: end; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.filters label { min-width: 145px; max-width: 300px; flex: 1 1 170px; font-size: 14px; }
.filters label:has(input[name=q]) { flex-grow: 2; max-width: 450px; }
.filters input, .filters select { min-height: 44px; font-size: 15px; padding: 10px 11px; }
.filters > input { width: auto; flex: 1; min-width: 170px; }
.filters > button, .filters > .button { flex: 0 0 auto; }
.filters .filter-actions { display: flex; align-items: center; gap: 10px; }
.card > .filters { padding: 0 0 26px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin-top: 0; margin-bottom: 0; }
.card > .filters + .table-wrap { border-top: 0; }
.toolbar { justify-content: space-between; margin: 0 0 22px; }
.toolbar .actions, .actions form { margin: 0; }
.table-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.table-actions .button, .table-actions button { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin: 22px 0; color: var(--muted); font-size: 14px; }
.table-footer p { margin: 0; }
.card > .table-footer { margin-bottom: 0; padding-top: 20px; }
.table-footer .filters { padding: 0; margin: 0; border: 0; background: none; }
.pagination { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pagination > a, .pagination > span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 8px 12px; border: 1px solid #b7c7d0; border-radius: 4px; background: #fff; color: #2a4a60; font-size: 14px; text-decoration: none; }
.pagination a:hover { background: #e6f1e9; border-color: var(--primary); color: var(--primary); }
.pagination [aria-current], .pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { color: #60727f; background: #edf2f5; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.breadcrumbs a { color: #315c76; }
.breadcrumbs > span:not(:last-child) { color: #708491; }
.flash { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid #a2c9ae; border-radius: 5px; background: #eaf6ed; color: #164f2b; font-size: 15px; }
.flash.error, .error[role=alert] { padding: 16px 18px; border: 1px solid #d7a4a4; border-radius: 5px; background: #fff0ed; color: #962020; }
dl { display: grid; grid-template-columns: minmax(140px, 35%) minmax(0, 1fr); gap: 18px 24px; margin: 0; font-size: 16px; }
dt { color: var(--muted); font-size: 14px; }
dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.detail-grid > div { min-width: 0; }
.detail-grid dt { margin-bottom: 5px; }
.detail-grid dd { font-size: 16px; }
dl.detail-grid { grid-template-columns: minmax(140px, 35%) minmax(0, 1fr); }
dl.detail-grid dt, dl.detail-grid dd { margin: 0; }
.detail-section:not(.card) { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.financial-summary { display: grid; gap: 18px; }
.balance-card { padding: 20px; background: #f2f6f9; border-left: 4px solid #7b98ae; border-radius: 4px; }
.balance-card--due { background: #fff5e9; border-left-color: #a2651a; }
.balance-card--credit { background: #edf7ef; border-left-color: var(--primary); }
.balance-card.is-settled { background: #f1f5f7; border-left-color: #7c929f; }
.balance-label, .balance-help { display: block; color: #41576a; font-size: 14px; }
.balance-value { display: block; font-size: 30px; line-height: 1.25; letter-spacing: -.5px; margin: 8px 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.related-links { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.pre-line { white-space: pre-line; }
.field { margin: 0; }
.notice { padding: 16px 18px; margin: 22px 0; border-left: 4px solid #8a6422; background: #fff7e5; color: #674d20; font-size: 14px; }
.workspace-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; background: #e7edf0; border: 1px solid var(--line); border-radius: 9px; }
.workspace-tabs a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid transparent; border-radius: 6px; color: var(--ink); text-decoration: none; font-weight: 600; }
.workspace-tabs a:hover { background: #f7fafb; }
.workspace-tabs a[aria-current="page"] { background: #fff; border-color: #b4c7bb; color: #135933; box-shadow: 0 1px 3px #193d2010; }
.workspace-tabs .count-badge { min-width: 27px; background: #dce7df; color: #174b30; }
.workspace-tabs .count-badge.needs-attention { background: #ffe8bd; color: #724400; }
@media (min-width: 1200px) { .stats.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stats .stat-card { padding: 18px; } }
@media (max-width: 600px) { .workspace-tabs { display: grid; grid-template-columns: 1fr 1fr; } .workspace-tabs a { justify-content: space-between; padding: 10px; font-size: 14px; } }
main > .notice { margin: 0; }
.dashboard-columns { align-items: start; }
.list-card { overflow: hidden; }
.record-list > .row { display: flex; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid #dfe6eb; }
.record-list > .row:last-child { border-bottom: 0; padding-bottom: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid #dfe6eb; }
.row span:last-child { text-align: right; }
.record-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 42px; border: 1px solid #c4d5cd; border-radius: 5px; background: #f0f6f2; color: #305c43; flex-shrink: 0; }
.record-icon.warning { color: #80550b; background: #fff5df; border-color: #ddc493; }
.row-content { min-width: 0; flex: 1; }
.row-content .record-title { font-size: 15px; }
.row-content small { font-size: 13px; }
.row-content .badge { margin-top: 8px; }
.row-amount { text-align: right; flex-shrink: 0; }
.row-amount strong { color: var(--ink); font-size: 16px; }
.row-amount small { font-size: 13px; }
.card-footer { padding-top: 22px; margin-top: 24px; border-top: 1px solid var(--line); }
.renewal-empty { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px dashed #b7c8d1; border-radius: 5px; background: #f7fafb; }
.renewal-empty strong { color: var(--ink); font-size: 17px; }
.renewal-empty p { font-size: 14px; margin: 6px 0 0; }
dialog { color: var(--text); width: min(840px, calc(100vw - 40px)); max-height: calc(100dvh - 48px); margin: auto; padding: 30px; border: 1px solid #a8bdc9; border-radius: 9px; overflow: auto; overscroll-behavior: contain; box-shadow: 0 20px 80px #122d4540; }
dialog::backdrop { background: #122a3b80; }
dialog .card { border: 0; padding: 0; margin: 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 26px; }
.modal-header h2, .modal-header h3 { margin: 0; font-size: 23px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
button.modal-close { min-width: 44px; min-height: 44px; padding: 5px; color: var(--ink); background: #fff; border-color: #afc2ce; font-size: 24px; }
body:has(dialog[open]), body.nav-is-open { overflow: hidden; }
:focus-visible { outline: 3px solid #167147; outline-offset: 3px; }
.auth-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.auth-header { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 36px 24px 20px; }
.auth-header > span { padding-left: 24px; border-left: 1px solid #b6c6cf; color: var(--ink); font-size: 16px; }
.auth-shell main { max-width: 620px; justify-content: center; padding-top: 20px; padding-bottom: 56px; }
.login { padding: 36px; }
.auth-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid #b8d2bf; border-radius: 6px; color: var(--primary); background: #edf6ef; margin-bottom: 26px; }
.login-intro { font-size: 16px; color: var(--muted); }
.login-submit { width: 100%; justify-content: space-between; margin-top: 22px; }
.login-note { display: flex; gap: 12px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 26px; }
.login-note p { margin: 0; color: var(--muted); font-size: 14px; }
.login-note > .icon { color: var(--primary); margin-top: 3px; }
.auth-caption { text-align: center; font-size: 14px; color: var(--muted); margin: 0; }
.auth-shell .site-footer { max-width: 1100px; }
@media (max-width: 1320px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .two-columns { grid-template-columns: 1fr; }
    .header-date { display: none; }
    .stats .stat-money { font-size: 30px; }
}
@media (max-width: 1080px) {
    :root { --sidebar-width: 244px; --card-pad: 24px; }
    .sidebar-brand { padding-inline: 20px; }
    .site-header { padding-inline: 26px; }
    main { padding: 30px 26px; }
    .site-footer { padding-inline: 26px; }
    .header-kicker { display: none; }
    .header-account { gap: 14px; }
    .account-identity { border: 0; padding-left: 0; }
    .page-heading { align-items: start; }
    .page-heading > .actions { justify-content: end; }
}
@media (max-width: 800px) {
    .workspace { margin-left: 0; }
    .sidebar { position: static; width: 100%; }
    .sidebar-brand { justify-content: start; padding: 20px 24px; }
    .brand { flex-direction: row; gap: 20px; }
    .brand-logo { width: 174px; padding: 4px; }
    .brand-caption { margin: 0; }
    .main-nav { display: flex; gap: 24px; padding: 20px; }
    .nav-group { min-width: 210px; margin: 0; }
    .sidebar-footer { display: none; }
    .js .sidebar { position: fixed; width: 286px; max-width: calc(100vw - 32px); transform: translateX(-100%); visibility: hidden; transition: transform .18s, visibility 0s .18s; box-shadow: 8px 0 32px #17324a25; }
    .js .sidebar-brand { justify-content: space-between; padding: 24px 18px; }
    .js .brand { flex-direction: column; gap: 10px; align-items: start; }
    .js .brand-logo { width: 176px; }
    .js .brand-caption { padding-left: 4px; font-size: 15px; }
    .js .main-nav { display: block; padding: 22px 14px; }
    .js .nav-group { margin-bottom: 28px; min-width: 0; }
    .js .sidebar-footer { display: flex; }
    .js .nav-is-open .sidebar { transform: translateX(0); visibility: visible; transition: transform .18s; }
    .js button.nav-toggle, .js button.sidebar-close { display: inline-flex; }
    .site-header { padding: 16px 24px; }
    main { padding: 28px 24px; }
    .site-footer { padding-inline: 24px; }
    .page-heading { align-items: start; }
    .page-heading > .actions { justify-content: start; }
    .dashboard-heading { flex-wrap: wrap; }
}
@media (max-width: 600px) {
    :root { --section-gap: 24px; --card-pad: 20px; }
    h1 { font-size: 28px; }
    h2 { font-size: 20px; }
    main { padding: 24px 16px; }
    .site-header { padding: 14px 16px; gap: 12px; }
    .header-leading { gap: 12px; }
    .header-context { font-size: 15px; }
    .account-identity { display: none; }
    button.logout-button { width: 44px; padding: 10px; }
    .logout-button span { display: none; }
    .site-footer { padding: 0 16px 24px; font-size: 13px; }
    .site-footer > span:last-child { display: none; }
    .page-heading { flex-direction: column; align-items: stretch; gap: 20px; }
    .page-heading .muted, .page-heading > div > p:last-child { font-size: 15px; }
    .page-heading > .actions { justify-content: start; }
    .page-heading > form { align-self: stretch; }
    .dashboard-heading button { width: 100%; }
    .stats { gap: 14px; }
    .stat-card { padding: 18px; }
    .stat-top { align-items: start; }
    .stat-top > span { font-size: 14px; }
    .stat-top > .icon { display: none; }
    .stats strong { font-size: 32px; margin: 16px 0; }
    .stats .stat-money { font-size: 24px; }
    .stat-unit { display: block; margin: 6px 0 0; font-size: 13px; }
    .stat-bottom { font-size: 13px; padding-top: 14px; }
    .stat-bottom > .icon { display: none; }
    .section-heading { align-items: start; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
    .section-heading > a { min-height: 36px; }
    table { font-size: 14px; }
    th { font-size: 13px; }
    th, td { padding: 16px; }
    .form-grid, [data-price-pair] { grid-template-columns: 1fr; gap: 22px; }
    [data-price-pair] { padding: 18px; }
    .filters { padding: 18px; gap: 16px; }
    .filters label, .filters label:has(input[name=q]) { max-width: none; min-width: 0; flex: 1 1 calc(50% - 16px); }
    .filters label:has(input[name=q]) { flex-basis: 100%; }
    .filters input, .filters select { font-size: 16px; }
    .filters .filter-actions { width: 100%; }
    .filters .filter-actions > * { flex: 1; }
    .actions, .table-actions { gap: 10px; }
    .actions > .button, .actions > button { flex: 1; }
    .table-actions { flex-wrap: nowrap; }
    .form-actions > *, .modal-footer > * { flex: 1; }
    dl, dl.detail-grid { grid-template-columns: 1fr; gap: 5px; }
    dt:not(:first-child) { margin-top: 15px; }
    .detail-grid { grid-template-columns: 1fr; gap: 22px; }
    .balance-value { font-size: 28px; }
    .related-links { gap: 16px; }
    .row { align-items: start; gap: 14px; }
    .row-content .record-title { font-size: 15px; }
    .record-icon { display: none; }
    .row-amount { max-width: 145px; }
    .row-amount strong { font-size: 15px; }
    .row-amount small { font-size: 13px; }
    .renewal-empty { align-items: start; padding: 18px; }
    .table-footer { gap: 16px; }
    dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 22px; }
    .modal-header { align-items: start; gap: 14px; }
    .modal-header h2 { font-size: 22px; }
    .modal-header > button { min-width: 44px; padding-inline: 10px; }
    .auth-header { gap: 14px; padding: 28px 16px 14px; }
    .auth-header .brand-logo { width: 150px; }
    .auth-header > span { font-size: 15px; padding-left: 14px; }
    .auth-shell main { padding: 20px 16px 40px; }
    .login { padding: 28px 22px; }
}
@media (max-width: 390px) {
    .stats { grid-template-columns: 1fr; }
    .stats .stat-money { font-size: 30px; }
    .stat-unit { display: inline; margin-left: 7px; }
    .stat-top > .icon { display: block; }
    .stat-bottom > .icon { display: block; }
    .filters label { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print {
    .sidebar, .site-header, .site-footer, .page-heading > form, .filters, button, .button, .actions, .skip-link { display: none !important; }
    .workspace { margin: 0; }
    body { background: white; }
    main { padding: 0; max-width: none; }
    .card { break-inside: avoid; }
    .table-wrap { overflow: visible; }
    a { color: inherit; text-decoration: none; }
    .stats { grid-template-columns: repeat(4, 1fr); }
    .two-columns { grid-template-columns: 1fr 1fr; }
}

.detail-stack > * { margin-block: 0; }
.balance-label, .balance-help { margin-bottom: 0; }
.financial-summary + .muted { margin-top: 22px; }
.job-summary-amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.job-summary-amounts > div { min-width: 0; }
.job-summary-amounts dt { margin-bottom: 8px; }
.job-summary-amounts dd { font-size: 25px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-row-actions { min-width: 210px; }
.filters > .filter-details { flex-basis: 100%; order: 3; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); }
.filter-details > summary { width: fit-content; min-height: 36px; padding: 6px 0; cursor: pointer; color: #234d68; font-size: 14px; font-weight: 650; }
.filter-extra { display: flex; flex-wrap: wrap; align-items: end; gap: 18px; padding-top: 18px; }
@media (max-width: 1320px) { .job-summary-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .job-summary-amounts { grid-template-columns: 1fr; gap: 20px; }
    .job-summary-amounts dd { font-size: 26px; }
    .filter-extra { gap: 16px; }
}

/* Na desktopu ostaje uska navigaciona traka; na telefonu zasebna ladica. */
.js button.nav-toggle { display: inline-flex; }
@media (min-width: 801px) {
    .js .sidebar-is-collapsed { --sidebar-width: 80px; }
    .sidebar-is-collapsed .sidebar-brand { padding: 24px 4px; min-height: 108px; align-items: center; }
    .sidebar-is-collapsed .brand-logo { width: 68px; padding: 3px; }
    .sidebar-is-collapsed .brand-caption, .sidebar-is-collapsed .nav-group-label,
    .sidebar-is-collapsed .main-nav a > span, .sidebar-is-collapsed .sidebar-footer { display: none; }
    .sidebar-is-collapsed .main-nav { padding: 18px 10px; }
    .sidebar-is-collapsed .nav-group { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
    .sidebar-is-collapsed .nav-group:last-child { border: 0; }
    .sidebar-is-collapsed .main-nav a { padding: 12px; justify-content: center; }
    .sidebar-is-collapsed .main-nav a > .icon { width: 22px; height: 22px; }
}

.nav-group-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; margin: 0 0 6px; padding: 10px 14px; cursor: pointer; list-style: none; border-radius: 4px; }
.nav-group-label::-webkit-details-marker { display: none; }
.nav-group-label:hover { background: #edf2f5; color: var(--ink); }
.nav-group-chevron { width: 16px; height: 16px; transform: rotate(90deg); }
.nav-group:not([open]) .nav-group-chevron { transform: rotate(0); }
.main-nav .nav-group { margin-bottom: 14px; }
@media (min-width: 801px) {
    .sidebar-is-collapsed .nav-group-items { display: block; }
}

/* Jednokratni obračun i dodatne stavke: isti osnovni interfejs, jasne cjeline. */
.job-entry-section { border: 0; border-bottom: 1px solid var(--line); margin: 0 0 30px; padding: 0 0 30px; min-width: 0; }
.job-entry-section legend { padding: 0 0 20px; color: var(--ink); font-size: 19px; font-weight: 650; }
.job-entry-form .wide > p:last-child { margin-bottom: 0; }
.job-quantity-preview { border: 1px solid #cfddd1; border-radius: 6px; padding: 20px; background: #f3f8f2; }
.job-quantity-preview > p { color: var(--ink); font-weight: 650; margin-bottom: 16px; }
.job-quantity-preview dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.job-quantity-preview dt { margin: 0 0 7px; font-size: 13px; }
.job-quantity-preview dd { color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-quantity-preview > small { margin-top: 18px; }
@media (max-width: 600px) {
    .job-entry-section { margin-bottom: 26px; padding-bottom: 26px; }
    .job-entry-section legend { font-size: 18px; padding-bottom: 18px; }
    .job-quantity-preview { padding: 18px; }
    .job-quantity-preview dl { grid-template-columns: 1fr; gap: 17px; }
    .job-quantity-preview dd { font-size: 22px; }
}

/* Više usluga na pretplati: jasan razmak između stavki i čitljivi zbirovi. */
.bundle-services { display: grid; gap: 16px; min-width: 250px; margin: 0; padding: 0; list-style: none; }
.bundle-service { min-width: 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); line-height: 1.65; }
.bundle-service:last-child { padding-bottom: 0; border-bottom: 0; }
.bundle-service > a { font-weight: 650; }
.bundle-service small { margin-top: 6px; font-size: 14px; line-height: 1.65; }
.bundle-service .badge { margin-top: 7px; margin-right: 5px; }
.bundle-summary { display: block; margin-top: 10px; color: #40586a; font-size: 14px; line-height: 1.65; }
.bundle-summary + .bundle-summary { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.bundle-summary strong { color: var(--ink); font-weight: 650; }
.subscriptions-register tbody td { vertical-align: top; }
.subscriptions-register th, .subscriptions-register .amount small { white-space: normal; }
.subscriptions-register .amount small { max-width: 160px; margin-left: auto; }
.bundle-table { min-width: 1080px; }
.bundle-table tbody td { vertical-align: top; padding-top: 22px; padding-bottom: 22px; }
.bundle-table tbody td:first-child { min-width: 230px; }
.bundle-table tbody td:nth-child(2) { white-space: nowrap; }
.message-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.65; }
.stats.grid.receivables-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.receivables-filters > .filters { margin: 0; padding: 0; border: 0; }
.card.receivables-card { padding: 0; overflow: hidden; }
.notice-compose { display: grid; gap: 24px; padding: var(--card-pad); }
.notice-compose-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; }
.notice-compose-heading > div { max-width: 78ch; min-width: 0; }
.notice-compose-heading h2 { margin: 0 0 10px; }
.notice-compose-heading p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.notice-compose-heading > button { flex-shrink: 0; }
.notice-compose-info { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border: 1px solid #c8d9e4; border-radius: 5px; background: #f0f6fa; color: #354f63; }
.notice-compose-info > .icon { margin-top: 2px; }
.notice-compose-info p { margin: 0; font-size: 14px; line-height: 1.65; max-width: 120ch; }
.notice-compose-note { display: block; width: min(100%, 760px); }
.notice-compose-note .field-optional { display: inline; color: var(--muted); font-weight: 400; }
.notice-compose-note textarea { display: block; margin-top: 9px; min-height: 96px; }
.notice-compose-note small { margin-top: 8px; font-weight: 400; }
.notice-off-page { margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 5px; }
.receivables-card > .table-wrap { margin: 0; border-width: 1px 0; }
.card.receivables-card > .table-footer { margin: 0; padding: 20px var(--card-pad); }
.receivables-table > thead > tr > .select-column, .receivables-table > tbody > tr > .select-column { width: 72px; text-align: center; padding-inline: 18px; }
.receivables-table .select-column input { margin: 0; vertical-align: middle; }
.receivables-table > thead > tr > .receivables-count, .receivables-table > tbody > tr > .receivables-count { text-align: center; }
.receivables-table > thead > tr > .receivables-action, .receivables-table > tbody > tr > .receivables-action { text-align: right; }
.receivables-table > tbody > .receivable-invoices > td { padding: 0; }
.receivable-invoices details { padding: 18px var(--card-pad); background: #f7fafb; }
.receivable-invoices summary { min-height: 28px; cursor: pointer; color: #35566d; font-size: 14px; }
.receivable-invoices details[open] > summary { margin-bottom: 18px; }
.receivables-empty { display: flex; align-items: flex-start; gap: 20px; padding-block: 32px; }
.receivables-empty .empty-icon { flex-shrink: 0; margin-top: 2px; }
.receivables-empty h2 { margin: 0 0 10px; }
.receivables-empty p { margin: 0 0 12px; max-width: 72ch; color: var(--muted); }
@media (max-width: 1200px) {
    .notice-compose-heading { flex-direction: column; gap: 20px; }
}
@media (max-width: 800px) {
    .stats.grid.receivables-stats { grid-template-columns: 1fr; }
    .notice-compose { gap: 20px; }
    .notice-compose-heading > button { width: 100%; white-space: normal; }
    .notice-compose-info { padding: 14px; }
    .receivables-empty { gap: 14px; }
}
.bundle-table tbody td:nth-child(3) { min-width: 170px; }
.bundle-table tbody td:last-child { min-width: 220px; }
.bundle-table td small { margin-top: 7px; font-size: 14px; line-height: 1.65; }
.bundle-table .table-actions { margin-top: 14px; gap: 9px; }
.bundle-table .table-actions form { margin: 0; }
.bundle-table tfoot th, .bundle-table tfoot td { vertical-align: middle; }
@media (max-width: 1400px) {
    .bundle-table { min-width: 900px; }
    .bundle-table th, .bundle-table td { padding-left: 12px; padding-right: 12px; }
    .bundle-table tbody td:first-child { min-width: 190px; }
    .bundle-table tbody td:nth-child(3) { min-width: 140px; }
    .bundle-table tbody td:last-child { min-width: 150px; }
    .bundle-table .table-actions { display: flex; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
    .bundle-services { min-width: 230px; gap: 14px; }
    .bundle-service { padding-bottom: 14px; }
    .bundle-table .table-actions { flex-wrap: wrap; }
}
