/* AKT-UX-001 / AKT-VES-UX-100: predmetni rad, bez simuliranih podataka. */
@font-face { font-family: Inter; src: url('/static/aktoris/fonts/Inter-variable.ttf') format('truetype'); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: Manrope; src: url('/static/aktoris/fonts/Manrope-variable.ttf') format('truetype'); font-style: normal; font-weight: 200 800; font-display: swap; }
:root { color-scheme: light; font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.5; background: #F5F1E9; color: #0A263B; --midnight: #071B2C; --navy: #0A263B; --petrol: #0B405E; --steel: #435564; --copper: #C59C75; --ivory: #F5F1E9; --line: #DEDCD5; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 8px; padding: 11px 18px; font-weight: 600; color: white; background: var(--petrol); cursor: pointer; }
button:hover { background: #082F46; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }
a { color: var(--petrol); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--navy); font-family: Manrope, Inter, sans-serif; }
h1 { font-size: clamp(28px, 3vw, 32px); line-height: 1.25; margin: 0 0 16px; letter-spacing: -.025em; }
h2 { font-size: 20px; line-height: 28px; margin: 28px 0 12px; }
p { margin: 0 0 16px; }
.muted { color: var(--steel); }
.eyebrow { margin: 0 0 12px; color: var(--petrol); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.skip-link { position: absolute; left: 12px; top: -64px; z-index: 30; padding: 10px 14px; background: white; color: var(--midnight); }
.skip-link:focus { top: 8px; }
main { width: 100%; max-width: 1080px; flex: 1; margin: 0 auto; padding: 48px 32px 32px; }
.page-content { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.page-content > .message { width: min(100%, 800px); }
.message { padding: 12px 16px; margin-bottom: 20px; border-left: 3px solid var(--copper); background: #F7EEE4; }
footer { color: var(--steel); text-align: center; font-size: 12px; padding: 16px 24px 28px; }

/* Autentifikacija ostaje odvojena od profesionalnog radnog prostora. */
.auth-header { background: var(--midnight); color: var(--ivory); }
.header-inner { max-width: 1080px; min-height: 96px; margin: auto; padding: 16px 32px; display: flex; align-items: center; gap: 32px; }
.brand-mark { display: inline-flex; align-items: center; flex: none; padding: 10px 0; }
.brand-mark img { display: block; width: 190px; max-width: 100%; height: auto; }
.product-name { color: #D7DDD9; font-size: 14px; margin-right: auto; }
.plain-button { background: transparent; color: var(--ivory); border: 1px solid #8C9CA4; }
.plain-button:hover { background: #143448; }
.card { width: 100%; max-width: 520px; padding: 32px 40px; border: 1px solid var(--line); border-top: 3px solid var(--copper); border-radius: 14px; background: white; box-shadow: 0 18px 46px rgba(7,27,44,.06); }
.wide { max-width: 960px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 20px 0 8px; }
input, textarea, select { display: block; width: 100%; padding: 12px 14px; color: var(--navy); background: white; border: 1px solid #AEB8BB; border-radius: 8px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.errorlist { color: #9A2633; padding-left: 20px; margin: 12px 0; }
.qr { display: block; width: 244px; height: auto; max-width: 100%; aspect-ratio: 1; margin: 24px auto; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; }
code { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; background: #F2F3F1; padding: 4px 6px; border-radius: 4px; }
details { margin: 16px 0; }
summary { color: var(--petrol); font-weight: 600; cursor: pointer; }
details p { margin: 12px 0 0; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; list-style: none; }
.codes li { background: #F2F3F1; padding: 10px; border-radius: 8px; font-family: ui-monospace, Consolas, monospace; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }

/* Prijavljeni korisnik: navigacija po poslu, zatim bezbednosna i radna podešavanja. */
.app-mode { background: var(--ivory); }
.app-frame { width: 100%; min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.app-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 16px 16px; color: #F5F1E9; background: var(--midnight); overflow-y: auto; }
.app-sidebar .brand-mark { padding: 8px 12px; }
.app-sidebar .brand-mark img { width: 175px; }
.sidebar-product { margin: 0 12px 24px; color: #BAC6CA; font-size: 12px; }
.app-nav { display: flex; flex-direction: column; gap: 2px; }
.app-nav .nav-group, .mobile-menu .nav-group { margin: 20px 12px 8px; color: #AEBFC5; font-size: 11px; letter-spacing: .08em; font-weight: 700; text-transform: uppercase; }
.app-nav a, .app-nav .nav-unavailable, .mobile-menu nav a, .mobile-menu nav .nav-unavailable { display: flex; justify-content: space-between; gap: 8px; min-height: 42px; align-items: center; padding: 9px 12px; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; font-size: 14px; text-decoration: none; }
.app-nav a { color: #E3E8E8; }
.app-nav a:hover, .app-nav a[aria-current="page"] { background: #153B52; color: white; border-left-color: var(--copper); }
.app-nav .nav-unavailable { color: #8799A3; cursor: not-allowed; }
.nav-unavailable small { font-size: 10px; white-space: nowrap; }
.sidebar-bottom { display: grid; gap: 4px; padding: 18px 12px 4px; margin-top: auto; border-top: 1px solid #365161; overflow-wrap: anywhere; }
.sidebar-bottom span { color: #AEBFC5; font-size: 12px; }
.sidebar-bottom strong { font-size: 13px; font-weight: 600; }
.app-workspace { min-width: 0; display: flex; flex-direction: column; }
.app-topbar { min-height: 72px; display: flex; align-items: center; gap: 16px; padding: 12px clamp(20px, 3vw, 48px); border-bottom: 1px solid var(--line); background: #FCFBF8; color: var(--navy); }
.topbar-context { margin-right: auto; color: var(--steel); font-size: 13px; }
.topbar-context span { padding: 0 8px; color: #9EAAA9; }
.topbar-user { font-size: 13px; font-weight: 600; }
.topbar-logout { color: var(--petrol); background: transparent; border: 1px solid #BFCAC8; padding: 7px 12px; font-size: 13px; }
.topbar-logout:hover { color: white; }
.mobile-menu { display: none; }
.mobile-brand { display: none; }
.app-workspace main { max-width: none; margin: 0; padding: 32px clamp(20px, 3vw, 48px) 48px; }
.app-workspace .page-content { align-items: stretch; }
.app-workspace footer { margin-top: auto; text-align: left; padding-left: clamp(20px, 3vw, 48px); }
.page-heading { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-heading .eyebrow { margin-bottom: 8px; }
.page-heading p:last-child { margin-bottom: 0; }
.workspace-name { display: inline-block; border: 1px solid #D8DDD9; background: white; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--petrol); overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: white; }
.data-table { width: 100%; border-collapse: collapse; min-width: 620px; text-align: left; font-size: 14px; }
.data-table th, .data-table td { padding: 13px 16px; vertical-align: top; border-bottom: 1px solid #E8E3DB; overflow-wrap: anywhere; }
.data-table th { background: #EAEFEF; color: var(--midnight); font-size: 12px; letter-spacing: .03em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; border-radius: 999px; background: #E7F0EE; color: var(--petrol); padding: 3px 9px; font-size: 12px; font-weight: 700; }
.badge--muted { background: #EEE9E1; color: var(--steel); }
.admin-layout { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; }
.admin-layout > * { min-width: 0; }
.contact-detail-layout { grid-template-columns: minmax(0, 1fr); }
.contact-detail-layout > aside { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; }
.contact-detail-layout > aside .admin-panel { margin-bottom: 0; }
.prototype-warning { padding: 16px 20px; margin-bottom: 20px; border: 1px solid #B98661; border-left: 5px solid var(--copper); border-radius: 10px; background: #FFF8ED; }
.prototype-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.prototype-steps a { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; row-gap: 2px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: white; text-decoration: none; }
.prototype-steps a[aria-current] { border-color: var(--petrol); box-shadow: inset 0 0 0 1px var(--petrol); }
.prototype-steps span { display: grid; place-items: center; grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; color: white; background: var(--petrol); font-size: 12px; }
.prototype-steps strong { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.prototype-steps small { color: var(--steel); }
.prototype-scenarios { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.prototype-scenarios a { display: inline-block; padding: 8px 12px; border: 1px solid #BBC9C8; border-radius: 999px; background: white; text-decoration: none; font-size: 13px; }
.prototype-scenarios a[aria-current] { color: white; background: var(--petrol); }
.prototype-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); align-items: start; gap: 20px; }
.prototype-layout > * { min-width: 0; }
.prototype-main h2, .prototype-side h2, .prototype-decisions h2 { margin-top: 0; }
.prototype-fields { display: grid; gap: 0; margin: 18px 0; }
.prototype-fields > div { display: grid; grid-template-columns: minmax(130px, .33fr) minmax(0, 1fr); gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.prototype-fields dt { font-weight: 700; }
.prototype-fields dd { margin: 0; overflow-wrap: anywhere; }
.prototype-fields dd small { display: block; color: var(--steel); }
.prototype-gate { padding: 14px; margin-bottom: 0; border-radius: 8px; background: #EAF1EF; }
.prototype-decisions ol { padding-left: 22px; }
.prototype-decisions li { margin: 10px 0; }
.profile-page { width: 100%; }
.profile-status { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.profile-status h2 { margin: 0 0 8px; }
.profile-status .badge { flex: none; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.profile-grid > * { min-width: 0; }
.profile-grid .admin-panel { margin-bottom: 0; }
.profile-records { display: grid; gap: 10px; padding: 0; margin: 18px 0; list-style: none; }
.profile-records li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #FCFBF8; overflow-wrap: anywhere; }
.profile-records strong { flex: 1 1 100%; }
.profile-records small { color: var(--steel); }
.profile-records .badge { margin-left: auto; }
.profile-add { padding-top: 14px; margin-top: 20px; border-top: 1px solid var(--line); }
.profile-add summary { display: list-item; }
.profile-add form { padding-top: 8px; }
.profile-note { padding: 12px; margin-top: 16px; border-radius: 8px; background: #F1EEE8; color: var(--steel); }
.profile-followup { margin-top: 20px; }
.admin-panel { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: white; margin-bottom: 20px; box-shadow: 0 12px 32px rgba(7,27,44,.04); }
.admin-panel h2 { margin: 0 0 10px; }
.admin-panel p:last-child { margin-bottom: 0; }
.stat-list { list-style: none; padding: 0; margin: 0; }
.stat-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #EEE9E1; }
.stat-list li:first-child { border-top: 0; }
.stat-list strong { font-family: Manrope, Inter, sans-serif; }

/* WEB-005: obaveze prvo; prazno stanje ne glumi postojeće predmete. */
.workday { width: 100%; min-width: 0; }
.workday-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.workday-heading h1 { margin-bottom: 6px; }
.workday-heading p:last-child { margin-bottom: 0; }
.workday-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, .85fr); align-items: start; gap: 20px; }
.workday-primary, .workday-side, .workday-context { min-width: 0; }
.workday-primary { grid-column: 1; grid-row: 1 / span 2; }
.workday-side { grid-column: 2; grid-row: 1; }
.workday-context { grid-column: 2; grid-row: 2; }
.work-section { min-width: 0; padding: 24px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 14px; background: #FFF; box-shadow: 0 12px 32px rgba(7,27,44,.035); }
.work-section--attention { border-top: 3px solid var(--copper); }
.work-section--quiet { background: #FBFAF6; }
.work-section h2 { margin: 0 0 12px; }
.work-section p:last-child { margin-bottom: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.section-heading .eyebrow { margin-bottom: 4px; }
.section-state { color: var(--steel); background: #F1F0EC; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.empty-state { border-top: 1px solid var(--line); padding-top: 18px; color: var(--steel); font-size: 14px; }
.empty-title { margin-bottom: 6px; color: var(--navy); font-weight: 700; }
.process-steps { display: flex; gap: 6px; flex-wrap: wrap; padding: 0; margin: 18px 0 0; list-style: none; counter-reset: korak; }
.process-steps li { counter-increment: korak; padding: 8px 10px; background: #F2F5F3; border-radius: 8px; color: var(--navy); font-size: 12px; font-weight: 600; }
.process-steps li::before { content: counter(korak) ". "; color: var(--petrol); }
.workday-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.workday-pair .work-section { font-size: 14px; }
.workday-pair h2 { font-size: 17px; line-height: 24px; }
.work-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; font-weight: 700; }
.context-list { margin: 0; }
.context-list div { padding: 12px 0; border-top: 1px solid var(--line); }
.context-list dt { color: var(--steel); font-size: 12px; }
.context-list dd { margin: 2px 0 0; color: var(--navy); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.workspace-switch button { margin-top: 12px; }
.reference-search { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) auto; align-items: end; gap: 16px; margin-bottom: 18px; }
.contact-search { grid-template-columns: minmax(240px, 1fr) auto; }
.reference-search label { margin-top: 0; }
.reference-search button { min-height: 47px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; line-height: 1.4; }
.checkbox-label input { flex: none; width: auto; margin: 4px 0 0; }
.contact-mobile-list { display: none; }

/* ADR-0014: predmet kao radni prostor. Kartice zapisa umesto širokih tabela. */
.nav-count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--copper); color: var(--midnight); font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }
.case-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.case-header h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.case-header p { margin: 0; }
.case-tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 22px; padding: 0 0 2px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.case-tabs a { flex: none; padding: 10px 14px; border-bottom: 3px solid transparent; color: var(--steel); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.case-tabs a:hover { color: var(--navy); }
.case-tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--copper); }
.pill { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; background: #E7F0EE; color: var(--petrol); white-space: nowrap; }
.pill--warn { background: #F7EBDD; color: #7A4A1C; }
.pill--danger { background: #F6E1DE; color: #8A2A1E; }
.pill--muted { background: #EEE9E1; color: var(--steel); }
.pill--ok { background: #E3F0E6; color: #22583A; }
.record-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.record { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #FCFBF8; }
.record--closed { opacity: .78; background: #F6F4EF; }
.record-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.record-head strong { color: var(--navy); overflow-wrap: anywhere; }
.record-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; color: var(--steel); font-size: 13px; }
.record-meta > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.record-body { margin: 8px 0 0; overflow-wrap: anywhere; white-space: pre-line; }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.record-actions details { width: 100%; }
.record-actions summary { cursor: pointer; color: var(--petrol); font-size: 14px; font-weight: 600; }
.record-actions form { margin-top: 8px; }
.button-secondary { background: white; color: var(--petrol); border: 1px solid #B9C7C9; }
.button-secondary:hover { background: #EEF3F2; }
.attention-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attention-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 12px 14px; border-radius: 10px; background: #FBF6EF; border-left: 4px solid var(--copper); }
.attention-list li.nivo-visok { background: #FBEDEA; border-left-color: #B4412F; }
.attention-list li.nivo-nizak { background: #F4F5F2; border-left-color: #9AA7AD; }
.checklist { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #FCFBF8; }
.checklist li p { margin: 0; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid > .span-2 { grid-column: 1 / -1; }
.step-up { margin-top: 12px; padding: 14px; border-radius: 10px; background: #EEF3F2; }
.step-up label { margin-top: 0; }
.step-up input { max-width: 220px; letter-spacing: .2em; }
.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.overview-grid .admin-panel { margin-bottom: 0; }
.case-list-filter { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(150px, 220px) auto; align-items: end; gap: 16px; margin-bottom: 18px; }
.case-list-filter label { margin-top: 0; }
.case-list-filter button { min-height: 47px; }
.unread { border-left: 4px solid var(--copper); }
.hash { font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.upload-status { margin-top: 8px; }
@media (max-width: 1000px) { .overview-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .case-list-filter, .form-grid { grid-template-columns: minmax(0, 1fr); } .case-list-filter button { justify-self: start; } }

/* Siroki monitori: radna povrsina prati viewport, uz citljive proporcije. */
@media (min-width: 1921px) {
  .app-frame { grid-template-columns: clamp(252px, 12vw, 336px) minmax(0, 1fr); }
  .app-sidebar { padding: clamp(24px, 1.5vw, 36px) clamp(16px, 1.15vw, 28px) 24px; }
  .app-sidebar .brand-mark img { width: clamp(175px, 9vw, 225px); }
  .app-nav a, .app-nav .nav-unavailable { min-height: clamp(42px, 2vw, 54px); padding: 10px 14px; font-size: clamp(14px, .72vw, 18px); }
  .app-nav .nav-group { font-size: clamp(11px, .6vw, 14px); }
  .app-topbar { min-height: clamp(72px, 4vw, 96px); padding-inline: clamp(48px, 3vw, 96px); }
  .app-workspace main { padding: clamp(32px, 2vw, 56px) clamp(48px, 3vw, 96px) 56px; }
  .app-workspace footer { padding-left: clamp(48px, 3vw, 96px); }
  .app-workspace h1 { font-size: clamp(32px, 1.65vw, 44px); }
  .app-workspace h2 { font-size: clamp(20px, 1.05vw, 28px); line-height: 1.35; }
  .workday-layout { grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr); gap: clamp(20px, 1.25vw, 36px); }
  .workday-pair, .admin-layout { gap: clamp(20px, 1.25vw, 36px); }
  .workday-heading { margin-bottom: clamp(28px, 1.5vw, 40px); }
  .work-section, .admin-panel { padding: clamp(24px, 1.4vw, 40px); margin-bottom: clamp(20px, 1.25vw, 36px); }
  .workday-pair .work-section, .workday-pair h2, .empty-state, .context-list dd, .data-table { font-size: clamp(14px, .75vw, 19px); }
  .context-list dt, .section-state { font-size: clamp(11px, .65vw, 16px); }
  .data-table th, .data-table td { padding: clamp(13px, .85vw, 22px) clamp(16px, 1vw, 26px); }
}

@media (max-width: 1000px) { .app-frame { grid-template-columns: 220px minmax(0, 1fr); } .admin-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) { .prototype-layout { grid-template-columns: minmax(0, 1fr); } .prototype-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) { .contact-detail-layout > aside { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .reference-search, .contact-search { grid-template-columns: 1fr; } .reference-search button { justify-self: start; } }
@media (max-width: 1100px) { .workday-layout { display: flex; flex-direction: column; } .workday-primary, .workday-side, .workday-context { width: 100%; } }
@media (max-width: 1000px) {
  .contact-desktop-table { display: none; }
  .contact-mobile-list { display: grid; gap: 12px; }
  .contact-mobile-list dl { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #FCFBF8; }
  .contact-mobile-list dt { margin-top: 10px; color: var(--steel); font-size: 12px; }
  .contact-mobile-list dt:first-child { margin-top: 0; }
  .contact-mobile-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
}
@media (max-width: 760px) {
  .app-frame { display: block; }
  .app-sidebar { display: none; }
  .app-topbar { min-height: 64px; padding: 10px 16px; gap: 10px; color: white; background: var(--midnight); border-bottom: 0; }
  .mobile-menu { display: block; margin: 0; }
  .mobile-brand { display: inline-flex; padding: 0; margin-right: auto; }
  .mobile-brand img { width: 160px; }
  .mobile-menu summary { list-style: none; padding: 8px 10px; border: 1px solid #6C858E; border-radius: 8px; color: white; font-size: 13px; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu[open] nav { position: absolute; z-index: 15; top: 58px; left: 16px; right: 16px; max-height: 70vh; overflow-y: auto; padding: 10px; background: var(--midnight); border-radius: 12px; box-shadow: 0 18px 46px rgba(7,27,44,.3); }
  .mobile-menu nav a { color: #E3E8E8; }
  .mobile-menu nav a[aria-current="page"] { color: white; background: #153B52; border-left-color: var(--copper); }
  .mobile-menu nav .nav-unavailable { color: #8799A3; }
  .topbar-context { display: none; }
  .topbar-user { display: none; }
  .topbar-logout { color: white; border-color: #6C858E; }
  .app-workspace main { padding: 24px 16px 40px; }
  .app-workspace footer { padding-left: 16px; }
  .page-heading { display: block; }
  .header-inner { min-height: 80px; padding: 12px 20px; gap: 16px; flex-wrap: wrap; }
  .brand-mark img { width: 160px; }
  .product-name { order: 3; width: 100%; margin: -8px 0 0; }
  body:not(.app-mode) main { padding: 24px 16px 40px; }
  .card { padding: 28px 24px; }
  .workday-heading { display: block; }
  .workday-heading .workspace-name { margin-top: 14px; }
}
@media (max-width: 560px) { .workday-pair { grid-template-columns: 1fr; gap: 0; } .section-heading { align-items: flex-start; flex-direction: column; } .work-section { padding: 20px; } }
@media (max-width: 560px) { .prototype-steps { grid-template-columns: minmax(0, 1fr); } .prototype-fields > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
@media (max-width: 560px) { .profile-status { flex-direction: column; } .profile-records .badge { margin-left: 0; } }
@media (max-width: 390px) { .app-topbar { padding-inline: 8px; gap: 6px; } .codes { grid-template-columns: 1fr; } .card { padding: 24px 18px; } }

/* ADR-0019: poređenje verzija nalaza */
.diff { list-style: none; margin: 0; padding: 0; font-family: ui-monospace, Consolas, monospace; font-size: .875rem; }
.diff li { display: flex; gap: .5rem; padding: .125rem .5rem; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.diff-oznaka { flex: 0 0 1ch; color: var(--steel); }
.diff-plus { background: #E3F0E4; color: #1E4D27; }
.diff-minus { background: #F6E1DE; color: #8A2A1E; text-decoration: line-through; }

/* ADR-0020: finansije */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.fin-summary > div { border: 1px solid var(--line); border-radius: 8px; padding: .75rem; background: #fff; min-width: 0; }
.fin-summary dt { font-size: .8125rem; color: var(--steel); }
.fin-summary dd { margin: 0; font-size: 1.125rem; font-weight: 600; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .5rem; }
.form-row > * { min-width: 0; }

/* ADR-0021: modal i koraci (prijem) */
a.button, a.button-secondary { display: inline-block; border-radius: 8px; padding: 11px 18px; font-weight: 600; text-decoration: none; }
a.button { color: white; background: var(--petrol); }
a.button:hover { background: #082F46; }
dialog.modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: 12px; padding: 0; background: white; color: var(--navy); box-shadow: 0 24px 60px rgba(7, 27, 44, .28); overflow: auto; }
dialog.modal::backdrop { background: rgba(7, 27, 44, .55); }
.modal-telo { padding: 20px 24px 24px; display: grid; gap: 12px; }
.modal-telo fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.modal-telo legend { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.modal-zaglavlje { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-zaglavlje h2 { margin: 0; }
.modal-zatvori { font-size: 1.6rem; line-height: 1; text-decoration: none; color: var(--steel); padding: 4px 8px; }
.modal-akcije { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.koraci { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; counter-reset: korak; flex-wrap: wrap; }
.koraci li { counter-increment: korak; font-size: .875rem; color: var(--steel); padding: 4px 10px; border-radius: 999px; background: #EEF1F1; }
.koraci li::before { content: counter(korak) ". "; }
.koraci li.koraci--tekuci { background: var(--petrol); color: white; font-weight: 600; }
.koraci li.koraci--gotov { background: #E3F0E4; color: #1E4D27; }
@media (max-width: 520px) { .modal-telo { padding: 16px; } .koraci li { font-size: .8rem; } }
.modal-telo [hidden] { display: none !important; }
@media (max-width: 520px) { .modal-telo .form-row { grid-template-columns: 1fr; } }

/* ADR-0023: vođeni prijem i postavka predmeta */
.tok-koraci { margin: 0 0 16px; }
.koraci li a { color: inherit; text-decoration: none; }
.koraci li a:hover { text-decoration: underline; }
.da-ne { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
.da-ne legend { font-weight: 600; margin-bottom: 4px; width: 100%; }
.button-link { background: none; color: var(--petrol); padding: 4px 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.button-link:hover { background: none; color: #082F46; }
.tok-akcija { border-left: 4px solid var(--petrol); }
.postavka { border-left: 4px solid var(--copper); margin-bottom: 16px; }
.postavka .koraci { margin: 8px 0; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.uputstvo { margin: 0; padding-left: 1.25rem; display: grid; gap: 10px; }

/* ADR-0032: pregled strane, prepoznat tekst, pretraga */
.pregled-strane { display: block; max-width: 100%; height: auto; border: 1px solid var(--border, #d6dde5); background: #fff; margin: 0 0 .75rem; }
.pregled-navigacija { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.prepoznat-tekst { white-space: pre-wrap; word-break: break-word; max-height: 28rem; overflow: auto; font-size: .875rem; background: var(--surface-muted, #f5f7f9); padding: .75rem; }
.pretraga-forma { margin: 0 0 1rem; }
.pretraga-red { display: flex; gap: .5rem; flex-wrap: wrap; }
.pretraga-red input[type=search] { flex: 1 1 14rem; min-width: 0; }
.isecak { margin: .25rem 0; }
.isecak mark { background: #ffe58a; padding: 0 .1em; }

/* WEB-015: etikete dokaza za štampu */
.etikete { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .75rem; }
.etiketa { display: flex; gap: .75rem; align-items: center; border: 1px dashed #8a97a6; padding: .5rem; background: #fff; color: #000; break-inside: avoid; }
.etiketa div { display: flex; flex-direction: column; gap: .15rem; }
.etiketa strong { font-size: 1.2rem; }
@media print {
  .app-sidebar, .app-topbar, footer, .no-print, .skip-link { display: none !important; }
  .etikete { grid-template-columns: repeat(2, 1fr); }
}

/* WEB-025: mesečni kalendar; na telefonu samo dani sa stavkama, jedan ispod drugog */
.kalendar-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0 0 .75rem; }
.kalendar { display: grid; gap: 1px; background: var(--border, #d6dde5); border: 1px solid var(--border, #d6dde5); }
.kalendar-red { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.kalendar-zaglavlje div { background: var(--surface-muted, #f5f7f9); padding: .35rem; font-weight: 600; text-align: center; }
.kalendar-dan { background: #fff; min-height: 6.5rem; padding: .35rem; display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.kalendar-dan.van-meseca { background: var(--surface-muted, #f5f7f9); color: #7a8794; }
.kalendar-dan.danas { outline: 2px solid #1f6feb; outline-offset: -2px; }
.kalendar-datum { font-weight: 600; }
.kalendar-datum-pun { display: none; }
.kalendar-stavka { display: block; font-size: .78rem; line-height: 1.25; padding: .15rem .3rem; border-radius: 4px; background: #e8f0fe; color: #0b3d91; text-decoration: none; overflow-wrap: anywhere; }
.kalendar-stavka.kritican { background: #fff1d6; color: #7a4a00; }
.kalendar-stavka.kasni { background: #fde2e1; color: #8a1c14; }
@media (max-width: 760px) {
  .kalendar { background: none; border: 0; gap: .5rem; }
  .kalendar-red { display: contents; }
  .kalendar-zaglavlje, .kalendar-dan.prazan, .kalendar-dan.van-meseca { display: none; }
  .kalendar-dan { min-height: 0; border: 1px solid var(--border, #d6dde5); border-radius: 6px; }
  .kalendar-datum-pun { display: inline; }
}

/* WEB-031: filteri revizije */
.filter-mreza { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .5rem 1rem; align-items: end; }
.filter-mreza .form-actions { margin: 0; }

/* ADR-0036: „Prijavi problem“ u gornjoj traci */
.topbar-prijava { font-size: .85rem; white-space: nowrap; }
.nav-settings { margin: 1rem 0; border-top: 1px solid #36505d; padding-top: .75rem; }
.nav-settings > summary { padding: .7rem 1rem; cursor: pointer; color: #e8eee9; font-weight: 600; }
.nav-settings > div { padding-left: .6rem; }
.case-tabs--grouped { overflow: visible; flex-wrap: wrap; align-items: center; }
.case-more { position: relative; margin-left: auto; }
.case-more > summary { padding: .6rem; cursor: pointer; }
.case-more > div { position: absolute; z-index: 5; right: 0; min-width: 14rem; background: white; border: 1px solid var(--line); border-radius: .5rem; box-shadow: 0 8px 20px #071b2c18; padding: .5rem; }
.case-more a { display: block; }
.case-subnav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: -.25rem 0 1.25rem; }
.case-subnav a { color: var(--steel); padding: .35rem 0; }
.case-subnav a[aria-current] { color: var(--petrol); font-weight: 700; text-decoration-thickness: 2px; }
.next-action { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1rem 1.25rem; margin: 0 0 1.25rem; border: 1px solid #bad1cd; border-left: 4px solid var(--petrol); border-radius: .6rem; background: #f2f8f6; }
.next-action h2 { font-size: 1.15rem; margin: .2rem 0; }
.next-action p { margin: .3rem 0; }
.next-action > a { flex-shrink: 0; }
.draft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; background: #f2f8f6; border: 1px solid #bad1cd; border-radius: .5rem; padding: .8rem; margin: 0 0 1rem; position: sticky; top: 0; z-index: 4; }
.draft-actions [role=status] { flex: 1 1 12rem; }
.draft-actions [hidden] { display: none !important; }
@media (max-width: 760px) { .next-action { align-items: stretch; flex-direction: column; gap: .65rem; } .case-more { margin-left: 0; } .case-more > div { left: 0; right: auto; } .case-tabs--grouped > a { padding: .5rem .65rem; } }
.nav-prijava { display: none; }
@media (max-width: 760px) { .topbar-prijava { display: none; } .nav-prijava { display: block; } }

/* Radni prostor: alatke gore, posao levo, široke forme na zahtev. */
[hidden] { display: none !important; }
.nav-secondary { border-top: 1px solid #365161; padding-top: 16px; margin-top: 24px; }
.topbar-search { display:flex; align-items:center; gap:10px; max-width:600px; flex:1; margin-right:auto; padding:0 12px; background:#F1F3F1; border:1px solid #D5DDDA; border-radius:10px; min-width:0; }
.topbar-search svg, .notification-link svg { flex:none; width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.topbar-search input { background:transparent; border:0; min-width:0; padding:10px 0; font-size:14px; }
.topbar-search button { flex:none; background:transparent; color:var(--steel); padding:5px 8px; border:1px solid #CDD6D2; font-size:14px; }
.topbar-actions { display:flex; align-items:center; gap:18px; margin-left:auto; flex:none; }
.topbar-user { color:var(--navy); text-decoration:none; }
.notification-link { position:relative; display:grid; place-items:center; width:42px; height:42px; border:1px solid #D5DDDA; border-radius:10px; text-decoration:none; background:white; }
.notification-link:hover, .notification-link[aria-current] { background:#E8F1EF; }
.notification-count { position:absolute; top:-5px; right:-5px; border:2px solid #FCFBF8; background:var(--petrol); color:white; font-size:10px; min-width:20px; height:20px; border-radius:20px; text-align:center; font-weight:700; line-height:16px; padding:0 3px; }
.settings-context { display:flex; align-items:center; gap:10px; color:var(--steel); font-size:13px; margin-bottom:12px; }
.section-tabs { display:flex; flex-wrap:wrap; gap:4px; border-bottom:1px solid var(--line); margin-bottom:24px; }
.section-tabs a { padding:10px 16px; text-decoration:none; border-bottom:3px solid transparent; font-size:14px; }
.section-tabs a[aria-current] { color:var(--navy); border-bottom-color:var(--petrol); font-weight:700; }
.section-tabs a:hover { background:#EAEFEA; }
.settings-section { margin-bottom:28px; }
.settings-section h2 { margin:0 0 14px; font-size:18px; }
.settings-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:14px; }
.settings-card { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:22px; border:1px solid var(--line); border-radius:12px; background:white; text-decoration:none; }
.settings-card strong { display:block; margin-bottom:6px; font-size:16px; }
.settings-card span span { color:var(--steel); font-size:13px; line-height:1.6; display:block; }
.settings-card:hover { border-color:var(--petrol); box-shadow:0 4px 16px #071B2C0A; }
.entry-toolbar { display:flex; justify-content:flex-end; gap:12px; margin:0 0 20px; scroll-margin-top:20px; }
.entry-toolbar:has(button:first-child[hidden]) { justify-content:flex-start; }
.entry-panel { width:100%; min-width:0; }
.entry-panel > .admin-panel { margin-bottom:20px; }
.entry-panel form { width:100%; max-width:1120px; }
.entry-panel fieldset { border:1px solid var(--line); border-radius:10px; padding:18px 22px; margin:24px 0; }
.entry-panel legend { font-weight:700; padding:0 8px; }
.entry-panel .form-row, .entry-panel .form-grid { gap:16px 22px; }
.entry-sections { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.entry-sections button { background:white; color:var(--petrol); border:1px solid #C8D6D2; font-size:14px; }
.entry-sections button[aria-pressed=true] { background:var(--petrol); color:white; border-color:var(--petrol); }
.profile-grid { grid-template-columns:minmax(0,1fr); }
.home-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(280px,1fr); gap:20px; align-items:start; }
.home-grid .work-section { margin:0; }
.home-context { grid-column:1 / -1; }
.home-context summary { margin:0; }
.home-context .context-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:20px; }
.home-context .workspace-switch { max-width:560px; }
.home-grid h2 { font-size:20px; }
.home-intake-list { padding:0; margin:0; list-style:none; }
.home-intake-list li { border-top:1px solid var(--line); padding:12px 0; }
.home-intake-list li:first-child { border:0; padding-top:0; }
@media (min-width:1700px) { .app-workspace main { padding:32px 48px 48px; } .app-workspace h1 { font-size:32px; } .app-workspace h2 { font-size:20px; } .app-topbar { padding-inline:48px; } }
@media (max-width:1100px) { .home-grid { grid-template-columns:minmax(0,1fr); } .home-context { grid-column:auto; } .topbar-user { display:none; } }
@media (max-width:760px) {
 .app-topbar { display:flex; flex-wrap:wrap; gap:10px; padding:10px 16px; }
 .topbar-search { order:4; flex-basis:100%; max-width:none; margin:0; }
 .topbar-actions { gap:10px; }
 .app-topbar .mobile-brand { margin-right:auto; }
 .notification-link { width:36px; height:36px; }
 .section-tabs a { padding:9px 10px; font-size:13px; }
 .entry-toolbar { justify-content:flex-start; }
 .entry-panel fieldset { padding:14px; }
 .entry-panel .form-row, .entry-panel .form-grid { grid-template-columns:minmax(0,1fr); gap:0; }
 .home-grid .section-heading { align-items:flex-start; flex-direction:column; }
}.home-support { display:grid; gap:20px; }
.home-footnote { font-size:13px; margin-top:16px; }
.entry-panel [data-repeat-remove] { padding:7px 12px; font-size:13px; margin-top:16px; }.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip-path:inset(50%) !important; white-space:nowrap !important; border:0 !important; }.entry-panel { max-width:1200px; justify-self:center; }
.entry-toolbar:has(button:first-child[hidden]) { width:100%; max-width:1200px; margin-inline:auto; }
@media (max-width:760px) { .app-topbar .mobile-brand, .app-topbar .mobile-brand img { width:110px; } .app-topbar .mobile-brand { flex-basis:110px; } }
/* CSP: bez inline stilova (ADR-0040). */
.red-platno { max-width: 100%; height: auto; touch-action: none; }
