/* ============================================================
   Gradilišni Menadžer - stilovi
   Dark anthracite + emerald
   ============================================================ */

:root {
    --bg: #111318;
    --bg-deep: #0C0E12;
    --card: #171A21;
    --card-2: #1D212A;
    --card-3: #222733;
    --border: #272C36;
    --border-strong: #343B48;
    --text: #ECEEF2;
    --text-soft: #C6CBD5;
    --muted: #98A1B1;
    --muted-2: #7C8698;

    --accent: #10B981;
    --accent-strong: #34D399;
    --accent-soft: rgba(16, 185, 129, 0.12);
    --accent-line: rgba(16, 185, 129, 0.35);

    --amber: #F59E0B;
    --amber-soft: rgba(245, 158, 11, 0.12);
    --rose: #F87171;
    --rose-soft: rgba(248, 113, 113, 0.12);
    --sky: #38BDF8;
    --sky-soft: rgba(56, 189, 248, 0.12);
    --violet: #A78BFA;
    --violet-soft: rgba(167, 139, 250, 0.12);

    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 10px;

    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.18);

    --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 520px at 82% -12%, rgba(16, 185, 129, 0.08), transparent 60%),
        radial-gradient(800px 500px at -10% 100%, rgba(56, 189, 248, 0.05), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
    margin: 0;
    font-family: var(--font-head);
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text);
}

p {
    margin: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

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

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    display: block;
}

.hidden {
    display: none !important;
}

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

.text-sm {
    font-size: 13px;
}

.text-xs {
    font-size: 12px;
}

.nowrap {
    white-space: nowrap;
}

.mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2C323D;
    border-radius: 20px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: #3A4250;
}

::selection {
    background: rgba(16, 185, 129, 0.3);
}

/* ============================================================
   DUGMAD
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-xs);
    background: var(--card-2);
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
    background: var(--card-3);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn i {
    font-size: 13px;
}

.btn-primary {
    background: linear-gradient(180deg, #14C48A, #0FAE79);
    color: #04251B;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2BD39B, #12B981);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-soft);
}

.btn-ghost:hover {
    background: var(--card-2);
    color: var(--text);
}

.btn-subtle {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent-strong);
}

.btn-subtle:hover {
    background: rgba(16, 185, 129, 0.18);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.3);
    color: #FCA5A5;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.2);
}

.btn-sm {
    height: 32px;
    padding: 0 11px;
    font-size: 12.5px;
    gap: 6px;
    border-radius: 8px;
}

.btn-sm i {
    font-size: 11.5px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 9px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
}

.btn-icon:hover {
    background: var(--card-2);
    color: var(--text);
}

.btn-block {
    width: 100%;
}

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.link-btn:hover {
    color: var(--accent-strong);
}

/* ============================================================
   BEDŽEVI I PROGRESS
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge-green {
    background: var(--accent-soft);
    color: #4ADE9E;
    border-color: rgba(16, 185, 129, 0.25);
}

.badge-amber {
    background: var(--amber-soft);
    color: #FBBF24;
    border-color: rgba(245, 158, 11, 0.25);
}

.badge-rose {
    background: var(--rose-soft);
    color: #FCA5A5;
    border-color: rgba(248, 113, 113, 0.25);
}

.badge-sky {
    background: var(--sky-soft);
    color: #7DD3FC;
    border-color: rgba(56, 189, 248, 0.25);
}

.badge-slate {
    background: rgba(148, 163, 184, 0.1);
    color: #CBD5E1;
    border-color: rgba(148, 163, 184, 0.2);
}

.badge-plain::before {
    display: none;
}

.progress {
    width: 100%;
    height: 8px;
    background: #242935;
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #0FAE79, #34D399);
    transition: width 0.4s ease;
}

.progress-bar.amber {
    background: linear-gradient(90deg, #D97706, #FBBF24);
}

.progress-bar.rose {
    background: linear-gradient(90deg, #DC2626, #F87171);
}

.progress-bar.slate {
    background: linear-gradient(90deg, #475569, #94A3B8);
}

.progress-sm {
    height: 6px;
}

/* ============================================================
   LOGIN
   ============================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 78%);
    pointer-events: none;
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.login-form-side {
    padding: 48px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 38px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 13px;
    background: linear-gradient(145deg, #2BD39B, #0B9E6C);
    color: #03251B;
    display: grid;
    place-items: center;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.04em;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.brand-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.brand-tag {
    font-size: 11.5px;
    color: var(--muted-2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-title {
    font-size: 29px;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 30px;
    max-width: 380px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap > i {
    position: absolute;
    left: 14px;
    color: var(--muted-2);
    font-size: 14px;
    pointer-events: none;
}

.input-wrap .input {
    padding-left: 40px;
    padding-right: 44px;
}

.input-wrap .eye-btn {
    position: absolute;
    right: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--muted-2);
    border-radius: 8px;
}

.input-wrap .eye-btn:hover {
    color: var(--text);
    background: var(--card-2);
}

.login-error {
    display: none;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
    border-radius: var(--radius-xs);
    background: var(--rose-soft);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: #FCA5A5;
    font-size: 13px;
    line-height: 1.45;
}

.login-error.show {
    display: flex;
}

.login-error i {
    margin-top: 2px;
}

.login-foot {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted-2);
    font-size: 11.5px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.login-aside {
    position: relative;
    background:
        radial-gradient(600px 380px at 20% 0%, rgba(16, 185, 129, 0.18), transparent 62%),
        linear-gradient(160deg, #171B22 0%, #0E1116 100%);
    border-left: 1px solid var(--border);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
}

.login-aside::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at 70% 30%, #000 10%, transparent 75%);
    pointer-events: none;
}

.login-aside > * {
    position: relative;
    z-index: 1;
}

.aside-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-strong);
}

.aside-title {
    font-size: 25px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 10px;
    max-width: 330px;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}

.feature {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.feature-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-strong);
    display: grid;
    place-items: center;
    font-size: 14px;
}

.feature-title {
    font-weight: 600;
    font-size: 13.5px;
    font-family: var(--font-head);
}

.feature-text {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: 2px;
}

.login-preview {
    margin-top: 8px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(23, 26, 33, 0.8);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.preview-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.preview-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 13px;
}

.preview-meta {
    font-size: 11px;
    color: var(--muted-2);
}

.preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 9px;
}

.preview-row .progress {
    height: 5px;
    flex: 1;
}

.preview-row strong {
    color: var(--text-soft);
    font-size: 11.5px;
}

/* ============================================================
   APP SHELL
   ============================================================ */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 262px;
    flex: 0 0 262px;
    background: rgba(12, 14, 18, 0.96);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.sidebar-inner {
    height: 100%;
    padding: 24px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px;
}

.brand .brand-mark {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    font-size: 14px;
    border-radius: 12px;
}

.brand-text .brand-name {
    font-size: 14.5px;
}

.brand-text .brand-tag {
    font-size: 10.5px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    flex: 1;
    margin: 0 -4px;
    padding: 0 4px;
}

.nav-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding: 14px 12px 7px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s;
    text-align: left;
    width: 100%;
    background: transparent;
}

.nav-link:hover {
    background: var(--card);
    color: var(--text-soft);
}

.nav-link.active {
    background: var(--accent-soft);
    border-color: rgba(16, 185, 129, 0.22);
    color: #6EE7B7;
    font-weight: 600;
}

.nav-link i {
    width: 17px;
    text-align: center;
    font-size: 14px;
    opacity: 0.9;
}

.nav-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    background: var(--card-3);
    color: var(--muted);
    padding: 1px 7px;
    border-radius: 99px;
}

.nav-link.active .nav-count {
    background: rgba(16, 185, 129, 0.18);
    color: var(--accent-strong);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 13px;
}

.avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2A3140, #1B1F28);
    border: 1px solid var(--border-strong);
    display: grid;
    place-items: center;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 12.5px;
    color: var(--accent-strong);
}

.user-meta {
    min-width: 0;
    flex: 1;
}

.user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 10.5px;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-actions {
    display: flex;
    gap: 6px;
}

.sidebar-actions .btn-icon {
    flex: 1;
    height: 32px;
    background: var(--card);
    border-color: var(--border);
}

.sidebar-actions .btn-icon:hover {
    background: var(--card-2);
}

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

.topbar {
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 32px;
    background: rgba(17, 19, 24, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.topbar-title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 15px;
}

.topbar-sub {
    font-size: 11.5px;
    color: var(--muted-2);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--muted);
    padding: 7px 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 99px;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-soft);
}

.content {
    width: 100%;
    max-width: 1420px;
    margin: 0 auto;
    padding: 30px 32px 70px;
}

.sidebar-backdrop {
    display: none;
}

/* ============================================================
   ZAGLAVLJE STRANICE / KARTICE
   ============================================================ */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-title {
    font-size: 25px;
    font-weight: 700;
}

.page-sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.card-title {
    font-size: 15.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}

.card-title i {
    color: var(--muted-2);
    font-size: 13px;
}

.card-sub {
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 3px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.07), transparent 70%);
    pointer-events: none;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 14px;
    flex: 0 0 36px;
}

.tone-green { background: var(--accent-soft); color: var(--accent-strong); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-sky { background: var(--sky-soft); color: var(--sky); }
.tone-rose { background: var(--rose-soft); color: var(--rose); }
.tone-violet { background: var(--violet-soft); color: var(--violet); }

.stat-value {
    font-family: var(--font-head);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-value small {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    margin-left: 4px;
}

.stat-foot {
    font-size: 11.5px;
    color: var(--muted-2);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.grid-main {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    gap: 20px;
}

/* ============================================================
   TABELE
   ============================================================ */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
}

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

.table thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-2);
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table thead th:first-child {
    border-top-left-radius: 10px;
}

.table thead th:last-child {
    border-top-right-radius: 10px;
    text-align: right;
}

.table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    vertical-align: middle;
}

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

.table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.018);
}

.table tbody td.right {
    text-align: right;
}

.table .cell-title {
    font-weight: 600;
    color: var(--text);
}

.table .cell-sub {
    font-size: 11.5px;
    color: var(--muted-2);
    margin-top: 2px;
}

.table .num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    color: var(--text-soft);
    white-space: nowrap;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
}

.row-click {
    cursor: pointer;
}

.thumb-stack {
    display: flex;
}

.thumb-stack img,
.thumb-stack .thumb-more {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--card);
    margin-left: -8px;
    background: var(--card-3);
}

.thumb-stack img:first-child {
    margin-left: 0;
}

.thumb-stack .thumb-more {
    display: grid;
    place-items: center;
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 600;
}

/* ============================================================
   FILTERI / PRETRAGA
   ============================================================ */

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 380px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-2);
    font-size: 13px;
}

.search-box .input {
    padding-left: 40px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted-2);
}

/* ============================================================
   FORME
   ============================================================ */

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.01em;
}

.label span {
    color: var(--rose);
}

.input,
.select,
.textarea {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: #10131A;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xs);
    color: var(--text);
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
    height: auto;
    min-height: 92px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.55;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398A1B1' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.input::placeholder,
.textarea::placeholder {
    color: #5B6474;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.13);
}

.input:disabled,
.select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input[type="date"].input {
    color-scheme: dark;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.hint {
    font-size: 11.5px;
    color: var(--muted-2);
    line-height: 1.5;
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: #10131A;
    font-size: 12.5px;
    color: var(--text-soft);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.check-item:hover {
    border-color: var(--border-strong);
}

.check-item input {
    accent-color: var(--accent);
    width: 15px;
    height: 15px;
    margin: 0;
}

.check-item.on {
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: #10131A;
    font-size: 13px;
    color: var(--text-soft);
}

.switch {
    position: relative;
    width: 38px;
    height: 21px;
    flex: 0 0 38px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch span {
    position: absolute;
    inset: 0;
    background: #333A46;
    border-radius: 99px;
    transition: background 0.2s;
}

.switch span::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.switch input:checked + span {
    background: var(--accent);
}

.switch input:checked + span::before {
    transform: translateX(17px);
}

/* ============================================================
   GRADILIŠTA - MREŽA KARTICA
   ============================================================ */

.site-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.site-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
    position: relative;
    overflow: hidden;
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.55), transparent);
    opacity: 0;
    transition: opacity 0.18s;
}

.site-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.site-card:hover::before {
    opacity: 1;
}

.site-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.site-card-title {
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.site-card-loc {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    margin-top: 5px;
}

.site-card-loc i {
    font-size: 10.5px;
    color: var(--muted-2);
}

.site-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.site-mini-item {
    font-size: 11.5px;
    color: var(--muted-2);
}

.site-mini-item strong {
    display: block;
    color: var(--text-soft);
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 6px;
}

.site-progress-row strong {
    color: var(--text-soft);
    font-size: 12px;
}

.site-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 4px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--muted);
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 3px 9px;
}

.chip i {
    font-size: 10px;
    color: var(--muted-2);
}

/* ============================================================
   HERO / DETALJI GRADILIŠTA
   ============================================================ */

.site-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(16, 185, 129, 0.10), rgba(16, 185, 129, 0.02) 40%, transparent 70%),
        var(--card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.site-hero::after {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    right: -90px;
    top: -160px;
    border-radius: 50%;
    border: 1px solid rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 0 38px rgba(16, 185, 129, 0.03), 0 0 0 80px rgba(16, 185, 129, 0.02);
    pointer-events: none;
}

.hero-main {
    flex: 1;
    min-width: 280px;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hero-title {
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px;
}

.hero-sub i {
    color: var(--muted-2);
    font-size: 11px;
}

.hero-sub .dot-sep {
    width: 3px;
    height: 3px;
    background: var(--muted-2);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
}

.hero-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.hero-meta-item .k {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-2);
    font-weight: 600;
}

.hero-meta-item .v {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 600;
    margin-top: 3px;
}

.hero-side {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.hero-ring {
    --p: 0;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) calc(var(--p) * 1%), #262B36 0);
    display: grid;
    place-items: center;
    position: relative;
    flex: 0 0 108px;
}

.hero-ring::before {
    content: '';
    position: absolute;
    inset: 9px;
    background: var(--card);
    border-radius: 50%;
}

.hero-ring-inner {
    position: relative;
    text-align: center;
}

.hero-ring-inner strong {
    display: block;
    font-family: var(--font-head);
    font-size: 23px;
    font-weight: 700;
    line-height: 1.1;
}

.hero-ring-inner span {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-2);
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================================
   TABOVI I PANELI
   ============================================================ */

.detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tabs {
    display: flex;
    gap: 26px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.015);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 1px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
    color: var(--text-soft);
}

.tab.active {
    color: var(--accent-strong);
    border-bottom-color: var(--accent);
}

.tab i {
    font-size: 12.5px;
    opacity: 0.9;
}

.tab-count {
    font-size: 10.5px;
    padding: 1px 6px;
    border-radius: 99px;
    background: var(--card-3);
    color: var(--muted);
    font-weight: 600;
}

.tab.active .tab-count {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.tab-panel {
    padding: 26px 24px 24px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.panel-title {
    font-size: 15px;
    font-weight: 700;
}

.panel-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.sub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.mini-card {
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
}

.mini-card .k {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted-2);
    font-weight: 600;
}

.mini-card .v {
    font-family: var(--font-head);
    font-size: 19px;
    font-weight: 700;
    margin-top: 4px;
}

.mini-card .s {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
}

/* ============================================================
   FAZE
   ============================================================ */

.milestone-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.milestone {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 16px;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.milestone-progress {
    width: 76px;
    flex: 0 0 76px;
}

.milestone-main {
    flex: 1;
    min-width: 0;
}

.milestone-top {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 7px;
}

.milestone-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}

.milestone-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-strong);
    font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   DOKUMENTA
   ============================================================ */

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.doc-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s;
}

.doc-card:hover {
    border-color: var(--border-strong);
}

.doc-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 15px;
    background: var(--sky-soft);
    color: var(--sky);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.doc-icon.pdf {
    background: var(--rose-soft);
    color: #FCA5A5;
    border-color: rgba(248, 113, 113, 0.22);
}

.doc-icon.xls {
    background: var(--accent-soft);
    color: #6EE7B7;
    border-color: rgba(16, 185, 129, 0.22);
}

.doc-icon.doc {
    background: var(--sky-soft);
    color: #7DD3FC;
    border-color: rgba(56, 189, 248, 0.22);
}

.doc-icon.img {
    background: var(--violet-soft);
    color: var(--violet);
    border-color: rgba(167, 139, 250, 0.22);
}

.doc-body {
    flex: 1;
    min-width: 0;
}

.doc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
}

.doc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 5px;
}

.doc-meta .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted-2);
}

.doc-actions {
    display: flex;
    gap: 2px;
    flex: 0 0 auto;
}

/* ============================================================
   OBAVEŠTENJA / ALERTI
   ============================================================ */

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.alert-item {
    display: flex;
    gap: 12px;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    background: rgba(248, 113, 113, 0.055);
    border: 1px solid rgba(248, 113, 113, 0.14);
    cursor: pointer;
    transition: background 0.15s;
}

.alert-item:hover {
    background: rgba(248, 113, 113, 0.09);
}

.alert-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(248, 113, 113, 0.12);
    color: #FCA5A5;
    font-size: 11px;
}

.alert-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-soft);
}

.alert-text {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alert-date {
    font-size: 10.5px;
    color: var(--muted-2);
    margin-top: 5px;
}

/* ============================================================
   DNEVNIK
   ============================================================ */

.log-work {
    max-width: 380px;
}

.log-work .t {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.log-work .s {
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 4px;
}

.issue-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 210px;
    font-size: 11.5px;
    color: #FCA5A5;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.18);
    padding: 4px 8px;
    border-radius: 8px;
    line-height: 1.4;
}

.issue-tag i {
    font-size: 10px;
    flex: 0 0 auto;
}

.issue-tag span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-drop {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: #10131A;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.photo-drop:hover {
    border-color: var(--accent-line);
    background: rgba(16, 185, 129, 0.04);
}

.photo-drop i {
    font-size: 22px;
    color: var(--muted-2);
    margin-bottom: 6px;
}

.photo-drop p {
    font-size: 12.5px;
    color: var(--muted);
}

.photo-drop strong {
    color: var(--accent-strong);
    font-weight: 600;
}

.photo-previews {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.photo-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 9px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card-3);
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumb button {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 10px;
    display: grid;
    place-items: center;
}

.photo-thumb .badge-keep {
    position: absolute;
    bottom: 3px;
    left: 3px;
    font-size: 8.5px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.85);
    color: #04251B;
    font-weight: 700;
}

.photo-thumb.marked {
    outline: 2px solid var(--rose);
    outline-offset: -2px;
}

.photo-thumb.marked img {
    opacity: 0.3;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.gallery img {
    aspect-ratio: 1.15;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: transform 0.15s;
}

.gallery img:hover {
    transform: scale(1.02);
}

/* ============================================================
   MODALI, TOAST, LIGHTBOX
   ============================================================ */

.modal-root {
    position: relative;
    z-index: 100;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 10, 0.72);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}

.modal {
    width: 100%;
    max-width: 540px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modalIn 0.18s ease;
}

.modal.modal-lg {
    max-width: 780px;
}

.modal.modal-xl {
    max-width: 960px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
}

.modal-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
}

.modal-close {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
}

.modal-close:hover {
    background: var(--card-2);
    color: var(--text);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.015);
}

.confirm-text {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.65;
}

.confirm-text strong {
    color: var(--text);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast-root {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-width: min(380px, calc(100vw - 40px));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    background: var(--card-2);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    color: var(--text-soft);
    animation: toastIn 0.2s ease;
}

.toast i {
    margin-top: 1px;
    font-size: 13px;
}

.toast-success i {
    color: var(--accent-strong);
}

.toast-error {
    border-color: rgba(248, 113, 113, 0.35);
    background: #241A1E;
}

.toast-error i {
    color: #FCA5A5;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(14px); }
    to { opacity: 1; transform: translateX(0); }
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(3, 5, 8, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.lightbox .lb-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* ============================================================
   PRAZNA STANJA / LOADER
   ============================================================ */

.empty {
    text-align: center;
    padding: 44px 20px;
    color: var(--muted);
}

.empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: var(--card-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    font-size: 19px;
    color: var(--muted-2);
}

.empty-title {
    font-family: var(--font-head);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-soft);
    margin-bottom: 4px;
}

.empty-text {
    font-size: 12.5px;
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.6;
}

.app-loading {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    color: var(--muted);
    font-size: 13px;
}

.spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #1D212A 25%, #252A35 37%, #1D212A 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1180px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop.open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(4, 6, 10, 0.6);
        backdrop-filter: blur(3px);
        z-index: 35;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .topbar {
        padding: 0 20px;
    }

    .content {
        padding: 24px 20px 60px;
    }

    .grid-main {
        grid-template-columns: 1fr;
    }

    .login-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .login-aside {
        display: none;
    }
}

@media (max-width: 860px) {
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .sub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .doc-grid {
        grid-template-columns: 1fr;
    }

    .hero-side {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 20px 14px 56px;
    }

    .topbar {
        padding: 0 14px;
        height: 64px;
    }

    .topbar-chip {
        display: none;
    }

    .page-title {
        font-size: 21px;
    }

    .card {
        padding: 18px;
        border-radius: 16px;
    }

    .site-hero {
        padding: 20px;
        border-radius: 18px;
    }

    .hero-title {
        font-size: 22px;
    }

    .hero-meta {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .hero-ring {
        width: 90px;
        height: 90px;
        flex-basis: 90px;
    }

    .hero-ring-inner strong {
        font-size: 19px;
    }

    .site-grid {
        grid-template-columns: 1fr;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .form-grid,
    .check-grid {
        grid-template-columns: 1fr;
    }

    .sub-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        gap: 18px;
        padding: 0 16px;
    }

    .tab-panel {
        padding: 20px 16px;
    }

    .photo-previews {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .modal {
        max-height: calc(100vh - 20px);
        border-radius: 18px;
    }

    .modal-body {
        padding: 18px;
    }

    .modal-foot {
        padding: 14px 18px;
    }

    .milestone {
        flex-wrap: wrap;
    }

    .milestone-progress {
        width: 100%;
        flex-basis: 100%;
    }

    .page-head {
        align-items: flex-start;
    }

    .login-page {
        padding: 16px;
    }

    .login-form-side {
        padding: 34px 24px;
    }

    .login-title {
        font-size: 24px;
    }
}

/* ============================================================
   ŠTAMPA
   ============================================================ */

@media print {
    body {
        background: #fff !important;
        color: #0F172A !important;
        font-size: 12px;
    }

    .sidebar,
    .topbar,
    .tabs,
    .page-actions,
    .no-print,
    .toast-root,
    .modal-overlay:not(.printable),
    .lightbox,
    .sidebar-backdrop {
        display: none !important;
    }

    .modal-overlay.printable {
        position: static;
        display: block;
        padding: 0;
        background: #fff;
        backdrop-filter: none;
    }

    .modal-overlay.printable .modal {
        max-width: none;
        max-height: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
        color: #0F172A;
    }

    .modal-overlay.printable .modal-head,
    .modal-overlay.printable .modal-foot,
    .modal-overlay.printable .modal-close {
        display: none !important;
    }

    .modal-overlay.printable .modal-body {
        overflow: visible;
        padding: 0;
        color: #0F172A;
    }

    .modal-overlay.printable .modal-body * {
        color: #0F172A !important;
        border-color: #CBD5E1 !important;
    }

    .modal-overlay.printable .badge {
        background: #F1F5F9 !important;
    }

    .app-shell {
        display: block;
    }

    body.printing-modal .app-shell {
        display: none !important;
    }

    .content {
        max-width: none;
        padding: 0;
    }

    .card,
    .site-hero,
    .detail-card,
    .mini-card,
    .doc-card,
    .milestone {
        background: #fff !important;
        border: 1px solid #CBD5E1 !important;
        box-shadow: none !important;
        color: #0F172A !important;
    }

    .site-hero::after,
    .stat-card::after {
        display: none;
    }

    .hero-title,
    .card-title,
    .panel-title,
    .site-card-title,
    .milestone-name,
    .doc-name,
    .table .cell-title,
    .stat-value {
        color: #0F172A !important;
    }

    .hero-sub,
    .hero-meta-item .v,
    .hero-meta-item .k,
    .card-sub,
    .panel-sub,
    .muted,
    .table tbody td,
    .table thead th,
    .doc-meta,
    .stat-label,
    .stat-foot {
        color: #475569 !important;
    }

    .badge {
        border: 1px solid #CBD5E1 !important;
        color: #0F172A !important;
    }

    .hero-ring {
        background: #E2E8F0 !important;
    }

    .hero-ring::before {
        background: #fff !important;
    }

    .table thead th {
        background: #F1F5F9 !important;
    }

    .table tbody td {
        border-color: #E2E8F0 !important;
    }
}
