/* =========================================================
   MojČlan v2.1.0 – izgled "B" (gusti, moderni SaaS)
   Učitava se zadnji na svakoj stranici (helpers/theme.php).
   1) tokeni  2) osnova  3) izbornik + paleta  4) stari dijelovi
   5) komponente novih stranica
   ========================================================= */

:root {
    --mc-bg: #FFFFFF;
    --mc-bg-soft: #FAFAFA;
    --mc-sidebar: #F7F7F8;
    --mc-surface: #FFFFFF;
    --mc-hover: #F4F4F5;
    --mc-border: #EAEAEC;
    --mc-border-strong: #E4E4E7;
    --mc-line: #F1F1F3;
    --mc-ink: #0A0A0B;
    --mc-ink-2: #3F3F46;
    --mc-muted: #6B6B76;
    --mc-faint: #8A8A94;
    --mc-primary: var(--primary-color, #064EAC);
    --mc-primary-soft: color-mix(in srgb, var(--mc-primary) 10%, #FFFFFF);
    --mc-primary-faint: color-mix(in srgb, var(--mc-primary) 5%, #FFFFFF);
    --mc-green: #0B6B45;
    --mc-green-bg: #E7F6EE;
    --mc-green-dot: #16A34A;
    --mc-amber: #8F4300;
    --mc-amber-bg: #FDF1DE;
    --mc-amber-dot: #F5A524;
    --mc-red: #9F1D14;
    --mc-red-bg: #FDECEA;
    --mc-red-dot: #E5484D;
    --mc-blue: #1E4FA8;
    --mc-blue-bg: #E8F0FD;
    --mc-blue-dot: #3B82F6;
    --mc-radius: 12px;
    --mc-radius-sm: 7px;
    --mc-shadow-sm: 0 1px 2px rgba(10, 10, 11, .05);
    --mc-shadow-md: 0 8px 24px rgba(10, 10, 11, .08), 0 1px 3px rgba(10, 10, 11, .06);
    --mc-font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mc-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
}


/* ---------- 2) OSNOVA ---------- */

html body {
    font-family: var(--mc-font);
    color: var(--mc-ink);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: "ss01", "cv11";
}

body:not(.login-page) {
    background: var(--mc-bg-soft);
}

body.mc-v2 {
    background: var(--mc-bg);
}

body button,
body input,
body select,
body textarea {
    font-family: inherit;
}

body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]),
body select,
body textarea {
    border-radius: var(--mc-radius-sm);
}

body input:focus-visible,
body select:focus-visible,
body textarea:focus-visible,
body button:focus-visible,
body a:focus-visible {
    outline: 2px solid var(--mc-primary);
    outline-offset: 2px;
}

body ::selection {
    background: var(--mc-primary-soft);
}


/* ---------- 3) IZBORNIK ---------- */

body .sidebar {
    width: 240px;
    background: var(--mc-sidebar);
    color: var(--mc-ink);
    border-right: 1px solid var(--mc-border);
    padding: 14px 10px;
    gap: 14px;
    overflow-y: auto;
    z-index: 30;
}

body .admin-main {
    width: calc(100% - 240px);
    margin-left: 240px;
}

body .sidebar-brand {
    padding: 6px 8px;
    gap: 10px;
}

body .sidebar-logo,
body .sidebar-logo-placeholder {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 7px;
}

body .sidebar-logo {
    padding: 2px;
    border: 1px solid var(--mc-border);
}

body .sidebar-logo-placeholder {
    background: var(--mc-primary);
    font-size: 13px;
    font-weight: 700;
}

body .sidebar-brand-text strong {
    font-size: 13px;
    font-weight: 600;
}

body .sidebar-brand-text span {
    margin-top: 1px;
    color: var(--mc-muted);
    font-size: 12px;
}

.mc-cmd-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--mc-border-strong);
    border-radius: 8px;
    background: #FFFFFF;
    color: var(--mc-muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}

.mc-cmd-trigger:hover {
    border-color: #D4D4D8;
    color: var(--mc-ink-2);
}

.mc-cmd-trigger span {
    flex: 1;
    white-space: nowrap;
}

.mc-cmd-trigger kbd,
.mc-kbd {
    font-family: var(--mc-mono);
    font-size: 11px;
    color: var(--mc-muted);
}

body .sidebar-nav {
    gap: 14px;
}

.mc-nav-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mc-nav-label {
    padding: 0 10px 4px;
    color: var(--mc-muted);
    font-size: 12px;
    font-weight: 500;
}

body .nav-item {
    min-height: 34px;
    padding: 0 10px;
    gap: 10px;
    border-radius: 7px;
    color: var(--mc-ink-2);
    font-size: 13.5px;
    font-weight: 500;
}

body .nav-item:hover {
    background: #EDEDEF;
    color: var(--mc-ink);
}

body .nav-item.active {
    background: #FFFFFF;
    color: var(--mc-ink);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--mc-border-strong), var(--mc-shadow-sm);
}

body .nav-item.active .nav-icon {
    color: var(--mc-primary);
}

body .nav-icon {
    width: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--mc-muted);
}

.mc-nav-text {
    flex: 1;
    min-width: 0;
}

body .nav-count-badge {
    margin-left: auto;
    min-width: 0;
    height: auto;
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--mc-primary-soft);
    color: var(--mc-primary);
    font-size: 11px;
    font-weight: 600;
}

body .sidebar-bottom {
    margin-top: auto;
    border-top: 0;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body .sidebar-user {
    margin: 0;
    padding: 8px;
    gap: 10px;
    border-top: 1px solid var(--mc-border);
    padding-top: 12px;
}

body .sidebar-user-avatar {
    width: 28px;
    height: 28px;
    background: #E4E4E7;
    color: var(--mc-ink);
    font-size: 12px;
}

body .sidebar-user-info strong {
    font-size: 13px;
    font-weight: 600;
}

body .sidebar-user-info span {
    color: var(--mc-muted);
    font-size: 12px;
}

.mc-logout {
    margin-left: auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    color: var(--mc-muted);
}

.mc-logout:hover {
    background: #EDEDEF;
    color: var(--mc-ink);
}

/* Paleta naredbi (Ctrl/⌘ K) */

.mc-cmd {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    background: rgba(10, 10, 11, .32);
}

.mc-cmd.is-open {
    display: flex;
}

.mc-cmd-box {
    width: 100%;
    max-width: 560px;
    overflow: hidden;
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 24px 64px rgba(10, 10, 11, .25), 0 0 0 1px rgba(10, 10, 11, .06);
}

.mc-cmd-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--mc-border);
    color: var(--mc-muted);
}

body .mc-cmd-input input {
    flex: 1;
    height: 52px;
    border: 0;
    padding: 0;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--mc-ink);
    border-radius: 0;
}

.mc-cmd-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 340px;
    overflow-y: auto;
}

.mc-cmd-group {
    padding: 8px 10px 4px;
    font-size: 12px;
    color: var(--mc-faint);
}

.mc-cmd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--mc-ink);
    font-size: 14px;
    text-decoration: none;
}

.mc-cmd-item .mc-icon {
    color: var(--mc-muted);
}

.mc-cmd-item.is-active,
.mc-cmd-item:hover {
    background: var(--mc-hover);
    color: var(--mc-ink);
}

.mc-cmd-item small {
    margin-left: auto;
    color: var(--mc-faint);
    font-size: 12px;
}

.mc-cmd-foot {
    display: flex;
    gap: 14px;
    padding: 9px 16px;
    border-top: 1px solid var(--mc-border);
    font-size: 12px;
    color: var(--mc-faint);
}

@media (max-width: 800px) {
    body .sidebar {
        width: 64px;
    }

    body .admin-main {
        width: calc(100% - 64px);
        margin-left: 64px;
    }

    .mc-nav-label,
    .mc-nav-text,
    .mc-logout,
    .mc-cmd-trigger span,
    .mc-cmd-trigger kbd {
        display: none;
    }

    .mc-cmd-trigger {
        justify-content: center;
        padding: 0;
    }

    body .nav-item {
        position: relative;
        justify-content: center;
    }

    body .nav-count-badge {
        position: absolute;
        top: 2px;
        right: 4px;
        padding: 0 4px;
        font-size: 10px;
    }
}


/* ---------- 4) POSTOJEĆE STRANICE ---------- */

body .topbar {
    min-height: 64px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--mc-border);
    box-shadow: none;
}

body .topbar h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.02em;
}

body .topbar p {
    color: var(--mc-muted);
    font-size: 13px;
}

body .alert {
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
}

body .alert-success {
    background: var(--mc-green-bg);
    border-color: #BFE6D1;
    color: var(--mc-green);
}

body .alert-error {
    background: var(--mc-red-bg);
    border-color: #F6C9C4;
    color: var(--mc-red);
}

body .btn-primary {
    border-radius: var(--mc-radius-sm);
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), var(--mc-shadow-sm);
}

/* Prijava */

body.login-page {
    background:
        radial-gradient(900px 500px at 15% 10%, color-mix(in srgb, var(--mc-primary) 30%, transparent), transparent 65%),
        radial-gradient(700px 500px at 90% 90%, color-mix(in srgb, var(--mc-primary) 18%, transparent), transparent 60%),
        #0B0D12;
}

body .login-card {
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06);
}

body .login-card-header h2 {
    font-weight: 600;
    letter-spacing: -.02em;
}

body .btn-login {
    height: 44px;
    border-radius: 8px;
    background: var(--mc-primary);
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .2);
}


/* ---------- 5) KOMPONENTE NOVIH STRANICA ---------- */

.mc-main {
    min-width: 0;
}

.mc-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 28px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--mc-border);
}

.mc-crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    color: var(--mc-muted);
    white-space: nowrap;
    overflow: hidden;
}

.mc-crumbs a {
    color: var(--mc-muted);
    text-decoration: none;
}

.mc-crumbs a:hover {
    color: var(--mc-ink);
}

.mc-crumbs strong {
    color: var(--mc-ink);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-topbar-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.mc-page {
    padding: 28px 28px 56px;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.mc-page-wide {
    padding: 0;
    max-width: none;
    gap: 0;
}

.mc-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.mc-page-head h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.mc-sub {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--mc-muted);
}

/* Gumbi */

.mc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
    background: #FFFFFF;
    color: var(--mc-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: var(--mc-shadow-sm);
}

.mc-btn:hover {
    background: var(--mc-hover);
    color: var(--mc-ink);
}

.mc-btn:disabled {
    opacity: .55;
    cursor: default;
}

.mc-btn-primary {
    border-color: transparent;
    background: var(--mc-primary);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(10, 10, 11, .14);
}

.mc-btn-primary:hover {
    background: var(--mc-primary);
    color: #FFFFFF;
    filter: brightness(1.08);
}

.mc-btn-danger {
    color: var(--mc-red);
}

.mc-btn-danger:hover {
    background: var(--mc-red-bg);
    color: var(--mc-red);
}

.mc-btn-sm {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 6px;
}

.mc-btn-lg {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.mc-btn-link {
    border-color: transparent;
    background: transparent;
    color: var(--mc-primary);
    box-shadow: none;
}

.mc-btn-link:hover {
    background: var(--mc-primary-faint);
    color: var(--mc-primary);
}

.mc-btn-icon {
    width: 32px;
    padding: 0;
}

.mc-btn-sm.mc-btn-icon {
    width: 28px;
}

/* Okviri */

.mc-card {
    background: var(--mc-surface);
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
}

.mc-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--mc-border);
}

.mc-card-head h2,
.mc-h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
}

.mc-card-head p,
.mc-h2-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--mc-muted);
}

.mc-card-body {
    padding: 16px;
}

.mc-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--mc-primary);
    text-decoration: none;
}

.mc-link:hover {
    text-decoration: underline;
}

.mc-link-muted {
    font-size: 13px;
    color: var(--mc-muted);
    text-decoration: none;
}

.mc-link-muted:hover {
    color: var(--mc-ink);
}

.mc-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
}

.mc-cols-stretch {
    align-items: stretch;
}

.mc-col-main {
    flex: 2 1 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.mc-col-side {
    flex: 1 1 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Metrike */

.mc-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    overflow: hidden;
    background: #FFFFFF;
}

.mc-metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    margin-right: -1px;
    border-right: 1px solid var(--mc-border);
    color: var(--mc-ink);
    text-decoration: none;
}

a.mc-metric:hover {
    background: var(--mc-bg-soft);
}

.mc-metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    color: var(--mc-muted);
}

.mc-metric-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.mc-metric-value {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.mc-metric-value small {
    font-size: 13px;
    font-weight: 400;
    color: var(--mc-muted);
    letter-spacing: 0;
}

.mc-metric-note {
    font-size: 12px;
    color: var(--mc-muted);
}

.mc-spark {
    flex: none;
    color: var(--mc-primary);
}

.mc-delta {
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mc-delta.is-up { color: var(--mc-green); background: var(--mc-green-bg); }
.mc-delta.is-down { color: var(--mc-red); background: var(--mc-red-bg); }
.mc-delta.is-flat { color: var(--mc-ink-2); background: var(--mc-hover); }

/* Graf stupaca */

.mc-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-chart-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.mc-chart-readout {
    font-size: 13px;
    color: var(--mc-muted);
    font-variant-numeric: tabular-nums;
}

.mc-bars {
    position: relative;
    height: 220px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-bottom: 1px solid var(--mc-border);
}

.mc-bars::before,
.mc-bars::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed #EDEDEF;
    pointer-events: none;
}

.mc-bars::before { top: 33%; }
.mc-bars::after { top: 66%; }

.mc-bar-btn {
    position: relative;
    z-index: 1;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.mc-bar-btn span {
    display: block;
    width: 100%;
    min-height: 2px;
    border-radius: 4px 4px 0 0;
    background: color-mix(in srgb, var(--mc-primary) 22%, #FFFFFF);
    transition: background .12s;
}

.mc-bar-btn.is-active span,
.mc-bar-btn:hover span,
.mc-bar-btn:focus-visible span {
    background: var(--mc-primary);
}

.mc-bar-labels {
    display: flex;
    gap: 8px;
    margin-top: -4px;
}

.mc-bar-labels span {
    flex: 1;
    text-align: center;
    font-size: 11px;
    color: var(--mc-faint);
}

/* Složena traka */

.mc-stack {
    display: flex;
    height: 10px;
    gap: 2px;
    border-radius: 99px;
    overflow: hidden;
    background: var(--mc-hover);
}

.mc-stack span {
    display: block;
    height: 100%;
}

.mc-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.mc-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mc-legend a {
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.mc-legend a:hover {
    text-decoration: underline;
}

.mc-legend strong {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mc-legend em {
    width: 44px;
    text-align: right;
    font-style: normal;
    color: var(--mc-muted);
    font-variant-numeric: tabular-nums;
}

.mc-swatch {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 2px;
}

.c-primary { background: var(--mc-primary); }
.c-amber { background: var(--mc-amber-dot); }
.c-gray { background: #D4D4D8; }
.c-blue { background: #93C5FD; }

/* Oznake statusa */

.mc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.5;
}

.mc-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .9;
}

.mc-pill.no-dot::before {
    display: none;
}

.mc-pill-green { color: var(--mc-green); background: var(--mc-green-bg); }
.mc-pill-green::before { background: var(--mc-green-dot); }
.mc-pill-amber { color: var(--mc-amber); background: var(--mc-amber-bg); }
.mc-pill-amber::before { background: var(--mc-amber-dot); }
.mc-pill-red { color: var(--mc-red); background: var(--mc-red-bg); }
.mc-pill-red::before { background: var(--mc-red-dot); }
.mc-pill-blue { color: var(--mc-blue); background: var(--mc-blue-bg); }
.mc-pill-blue::before { background: var(--mc-blue-dot); }
.mc-pill-gray { color: var(--mc-ink-2); background: var(--mc-hover); }
.mc-pill-gray::before { background: #A1A1AA; }

.mc-count {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--mc-hover);
    color: var(--mc-ink-2);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mc-id {
    font-family: var(--mc-mono);
    font-size: 12px;
    color: var(--mc-muted);
}

.mc-id-tag {
    font-family: var(--mc-mono);
    font-size: 12px;
    color: var(--mc-ink-2);
    background: var(--mc-hover);
    border-radius: 5px;
    padding: 2px 7px;
}

/* Avatar */

.mc-avatar {
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    background: var(--mc-hover);
    color: var(--mc-ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    object-fit: cover;
}

.mc-avatar-md {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.mc-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    font-size: 22px;
}

/* Kartice (tabovi) */

.mc-tabs {
    display: flex;
    gap: 20px;
    padding: 0 16px;
    border-bottom: 1px solid var(--mc-border);
    overflow-x: auto;
}

.mc-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mc-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 -2px 0 transparent;
}

.mc-tab:hover {
    color: var(--mc-ink);
}

.mc-tab[aria-selected="true"],
.mc-tab.is-active {
    color: var(--mc-ink);
    box-shadow: inset 0 -2px 0 var(--mc-ink);
}

.mc-tab .mc-count {
    font-weight: 500;
}

.mc-tabpanel {
    padding: 20px;
}

.mc-tabpanel[hidden] {
    display: none;
}

/* Tablica */

.mc-table-wrap {
    overflow-x: auto;
}

.mc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.mc-table thead th {
    padding: 9px 10px;
    color: var(--mc-muted);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--mc-border);
}

.mc-table thead th a {
    color: inherit;
    text-decoration: none;
}

.mc-table thead th a:hover {
    color: var(--mc-ink);
}

.mc-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--mc-line);
    vertical-align: middle;
}

.mc-table tbody tr:last-child td {
    border-bottom: 0;
}

.mc-table tbody tr:hover {
    background: #FAFAFB;
}

.mc-table tbody tr.is-selected {
    background: var(--mc-primary-faint);
}

.mc-table th:first-child,
.mc-table td:first-child {
    padding-left: 16px;
}

.mc-table th:last-child,
.mc-table td:last-child {
    padding-right: 16px;
}

.mc-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mc-table .muted {
    color: var(--mc-muted);
}

.mc-table input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--mc-primary);
    cursor: pointer;
}

.mc-check-cell {
    width: 20px;
}

.mc-person {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--mc-ink);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
}

.mc-person > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.mc-person strong {
    font-weight: 500;
}

.mc-person small {
    font-size: 12px;
    color: var(--mc-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-person:hover strong {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mc-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.mc-actions form {
    margin: 0;
}

.mc-empty {
    margin: 0;
    padding: 36px 16px;
    text-align: center;
    color: var(--mc-muted);
    font-size: 13px;
}

/* Alatna traka popisa */

.mc-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
}

.mc-input-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--mc-border-strong);
    border-radius: var(--mc-radius-sm);
    background: #FFFFFF;
    color: var(--mc-muted);
    flex: 0 1 300px;
}

.mc-input-search:focus-within {
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 3px var(--mc-primary-soft);
}

body .mc-input-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    padding: 0;
    outline: none;
    background: transparent;
    color: var(--mc-ink);
    font-size: 13px;
    border-radius: 0;
}

body .mc-select {
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--mc-border-strong);
    background: #FFFFFF;
    color: var(--mc-ink);
    font: inherit;
    font-size: 13px;
    box-shadow: var(--mc-shadow-sm);
}

.mc-bulk {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 28px 12px;
    padding: 8px 12px;
    border-radius: 9px;
    background: var(--mc-ink);
    color: #FFFFFF;
    font-size: 13px;
}

.mc-bulk.is-visible {
    display: flex;
}

.mc-bulk strong {
    margin-right: 6px;
    font-weight: 600;
}

.mc-bulk .mc-btn {
    height: 28px;
    background: transparent;
    border-color: #3F3F46;
    color: #FFFFFF;
    font-size: 12px;
    box-shadow: none;
}

.mc-bulk .mc-btn:hover {
    background: #27272A;
}

.mc-bulk .mc-bulk-clear {
    margin-left: auto;
    border-color: transparent;
    color: #A1A1AA;
}

.mc-progress {
    margin: 0 28px 12px;
    padding: 10px 12px;
    border: 1px solid var(--mc-border);
    border-radius: 9px;
    font-size: 13px;
    display: none;
}

.mc-progress.is-visible {
    display: block;
}

.mc-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 28px;
    border-top: 1px solid var(--mc-border);
    font-size: 12px;
    color: var(--mc-muted);
}

/* Bočni brzi pregled */

.mc-split {
    display: flex;
    min-height: calc(100vh - 56px);
}

.mc-split-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mc-drawer {
    flex: 0 0 380px;
    max-width: 100%;
    box-sizing: border-box;
    border-left: 1px solid var(--mc-border);
    background: #FFFFFF;
    display: none;
    flex-direction: column;
    box-shadow: -8px 0 24px rgba(10, 10, 11, .04);
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
}

.mc-drawer.is-open {
    display: flex;
}

.mc-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 12px 0 20px;
    border-bottom: 1px solid var(--mc-border);
    font-size: 13px;
    color: var(--mc-muted);
    flex: none;
}

.mc-drawer-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.mc-kv {
    margin: 0;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 9px 12px;
    font-size: 13px;
}

.mc-kv dt {
    color: var(--mc-muted);
}

.mc-kv dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.mc-kv a {
    color: var(--mc-primary);
    text-decoration: none;
}

.mc-box {
    border: 1px solid var(--mc-border);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.mc-box-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.mc-box-row > span:first-child {
    color: var(--mc-muted);
}

.mc-box-row strong {
    font-weight: 600;
}

@media (max-width: 1100px) {
    .mc-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        z-index: 60;
        box-shadow: var(--mc-shadow-md);
    }
}

/* Vremenska crta */

.mc-feed {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mc-feed li {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
}

.mc-feed li::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 14px;
    bottom: 0;
    border-left: 1px solid var(--mc-border);
}

.mc-feed li:last-child::after {
    display: none;
}

.mc-feed-dot {
    position: relative;
    z-index: 1;
    width: 9px;
    height: 9px;
    margin-top: 5px;
    flex: none;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 0 0 2px #A1A1AA;
}

.mc-feed-dot.is-green { box-shadow: 0 0 0 2px var(--mc-green-dot); }
.mc-feed-dot.is-primary { box-shadow: 0 0 0 2px var(--mc-primary); }
.mc-feed-dot.is-amber { box-shadow: 0 0 0 2px var(--mc-amber-dot); }

.mc-feed-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.45;
}

.mc-feed-text a {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.mc-feed-text a:hover {
    text-decoration: underline;
}

.mc-feed-text small {
    font-size: 12px;
    color: var(--mc-faint);
}

/* Profil */

.mc-profile-head {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.mc-profile-head h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.mc-profile-info {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--mc-muted);
}

.mc-section-label {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mc-ink);
}

.mc-dl {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 24px;
}

.mc-dl dt {
    font-size: 12px;
    color: var(--mc-muted);
}

.mc-dl dd {
    margin: 2px 0 0;
    font-size: 14px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.mc-dl dd a {
    color: var(--mc-primary);
    text-decoration: none;
}

.mc-divider {
    border: 0;
    border-top: 1px solid var(--mc-line);
    margin: 20px 0;
}

/* Obrasci */

.mc-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    min-width: 0;
}

body .mc-field input,
body .mc-field select,
body .mc-field textarea {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--mc-border-strong);
    background: #FFFFFF;
    color: var(--mc-ink);
    font: inherit;
    font-size: 13.5px;
    font-weight: 400;
    box-sizing: border-box;
    width: 100%;
    box-shadow: var(--mc-shadow-sm);
}

body .mc-field input:focus,
body .mc-field select:focus,
body .mc-field textarea:focus {
    outline: none;
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 3px var(--mc-primary-soft);
}

.mc-field-row {
    display: flex;
    gap: 10px;
}

.mc-field-row > * {
    flex: 1;
}

.mc-segment {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background: var(--mc-hover);
    border: 0;
    margin: 0;
}

.mc-segment legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.mc-segment label {
    flex: 1;
    position: relative;
}

.mc-segment input {
    position: absolute;
    opacity: 0;
    inset: 0;
    margin: 0;
    cursor: pointer;
}

.mc-segment span {
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--mc-muted);
}

.mc-segment input:checked + span {
    background: #FFFFFF;
    color: var(--mc-ink);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 1px var(--mc-border-strong);
}

.mc-segment input:focus-visible + span {
    outline: 2px solid var(--mc-primary);
}

.mc-preview {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--mc-primary-faint);
    border: 1px solid var(--mc-primary-soft);
}

.mc-preview small {
    font-size: 12px;
    color: var(--mc-muted);
}

.mc-preview strong {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--mc-ink);
}

.mc-preview span {
    font-size: 12px;
    line-height: 1.45;
    color: var(--mc-ink-2);
}

/* Iskaznica */

.mc-member-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 14px;
    background:
        radial-gradient(260px 160px at 100% 0%, rgba(255, 255, 255, .22), transparent 70%),
        var(--mc-primary);
    color: #FFFFFF;
    box-shadow: 0 10px 28px color-mix(in srgb, var(--mc-primary) 30%, transparent);
}

.mc-member-card .mc-id {
    color: rgba(255, 255, 255, .85);
}

/* Poruke */

.mc-alert {
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
}

.mc-alert a {
    color: inherit;
}

.mc-alert-success { background: var(--mc-green-bg); color: var(--mc-green); }
.mc-alert-error { background: var(--mc-red-bg); color: var(--mc-red); }

.mc-danger-zone {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
}

.mc-danger-zone p {
    margin: 0;
    font-size: 12px;
    color: var(--mc-muted);
    line-height: 1.5;
}

.mc-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 800px) {
    .mc-topbar {
        padding: 0 16px;
    }

    .mc-page {
        padding: 20px 16px 40px;
    }

    .mc-toolbar,
    .mc-foot {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mc-bulk,
    .mc-progress {
        margin-left: 16px;
        margin-right: 16px;
    }

    .mc-topbar-actions .mc-hide-sm {
        display: none;
    }
}


/* ---------- Ispis ---------- */

@media print {
    body .sidebar,
    .mc-topbar,
    .mc-cmd,
    .mc-bulk,
    .mc-drawer {
        display: none !important;
    }

    body .admin-main {
        width: 100% !important;
        margin-left: 0 !important;
    }
}
