:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #17202a;
    --muted: #667085;
    --border: #dfe4ea;
    --accent: #2156d9;
    --danger: #b42318;
    --success: #067647;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 28px; background: #101828; color: #fff; }
.topbar a { color: #fff; margin-left: 14px; }
.brand { font-size: 20px; font-weight: 700; margin-left: 0 !important; }
.badge { display: inline-block; margin-left: 10px; padding: 3px 8px; border-radius: 999px; background: #344054; font-size: 12px; }
.container { width: min(1180px, calc(100% - 32px)); margin: 28px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: 0 4px 16px rgba(16,24,40,.04); }
.card h2, .card h3 { margin-top: 0; }
.muted { color: var(--muted); }
.kpi { font-size: 34px; font-weight: 700; margin: 8px 0; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #f8fafc; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; }
input, select { width: 100%; padding: 11px 12px; border: 1px solid #cfd4dc; border-radius: 9px; background: #fff; }
button, .button { display: inline-block; border: 0; border-radius: 9px; padding: 11px 16px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 700; }
button.secondary, .button.secondary { background: #475467; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; background: #eef4ff; }
.flash.success { background: #ecfdf3; color: var(--success); }
.flash.error { background: #fef3f2; color: var(--danger); }
.pill { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #eef2f6; margin: 2px 4px 2px 0; font-size: 13px; }
.scope { font-family: Consolas, monospace; font-size: 13px; }
.footer { text-align: center; color: var(--muted); padding: 25px; }
.login-box { width: min(460px, calc(100% - 32px)); margin: 70px auto; }
.notice { border-left: 4px solid var(--accent); padding: 12px 14px; background: #eef4ff; border-radius: 8px; }
@media (max-width: 760px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .topbar nav { display: flex; flex-wrap: wrap; gap: 10px; }
    .topbar a { margin-left: 0; }
}
.table-wrap .button { white-space: nowrap; padding: 8px 12px; }

/* v1.2 — jasno i stalno vidljiv identitet djelatnika koji se uređuje */
.subject-banner {
    position: sticky;
    top: 12px;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(300px, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #344054;
    border-radius: 14px;
    background: #101828;
    color: #fff;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .22);
}
.subject-main { display: grid; gap: 3px; }
.subject-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: #b2ccff; }
.subject-name { font-size: 25px; line-height: 1.15; }
.subject-id { color: #d0d5dd; font-size: 13px; }
.subject-details { display: grid; gap: 5px; font-size: 14px; color: #eaecf0; }
.subject-back { background: #475467; text-align: center; white-space: nowrap; }
.distinction-card { margin-bottom: 18px; border-left: 5px solid var(--accent); }
.distinction-card h1 { margin-top: 0; margin-bottom: 8px; }
.distinction-card p { margin: 6px 0; }
.edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.current-state-card { margin-top: 18px; }

@media (max-width: 900px) {
    .subject-banner { grid-template-columns: 1fr; top: 6px; }
    .subject-back { justify-self: start; }
    .edit-grid { grid-template-columns: 1fr; }
}
