:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #17181a;
    --text-muted: #6b7280;
    --border: #e9e9ec;
    --accent: #111214;
    --accent-contrast: #ffffff;
    --success: #16a34a;
    --error: #dc2626;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.04);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
    --bg: #0f1115;
    --surface: #181a20;
    --text: #cdd0d6;
    --text-muted: #8b929e;
    --border: #2a2d35;
    --accent: #6d5fa0;
    --accent-contrast: #ffffff;
    --success: #4ade80;
    --error: #f87171;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
    --sidebar-bg: #15171c;
    --sidebar-active-bg: rgba(109,95,160,0.18);
    --sidebar-active-text: #a99bd0;
}

:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

:root[data-theme="ocean"] {
    --bg: #f5f9fc;
    --surface: #ffffff;
    --text: #17181a;
    --text-muted: #64748b;
    --border: #e1e9f0;
    --accent: #2563eb;
    --accent-contrast: #ffffff;
    --success: #16a34a;
    --error: #dc2626;
    --shadow: 0 1px 2px rgba(37,99,235,0.04), 0 8px 24px rgba(37,99,235,0.06);
    --sidebar-bg: #ffffff;
    --sidebar-active-bg: #eff6ff;
    --sidebar-active-text: #2563eb;
    --app-bar-bg: #ffffff;
    --app-bar-text: #17181a;
    --app-bar-text-muted: #64748b;
    --app-bar-border: #e1e9f0;
}

/* Sidebar ikonice - u ostalim temama imaju "rainbow" paletu (badge-purple,
   badge-orange, itd.), u Ocean temi su namerno sve u istoj plavoj porodici
   za dosledniji, smireniji izgled (viša specificnost pobeđuje badge-X boje). */
:root[data-theme="ocean"] .sidebar-icon-badge {
    background: #eff6ff;
    color: #2563eb;
}

/* Top bar pretpostavlja tamnu pozadinu na više mesta (beo logo, tamna dugmad) -
   u Ocean temi je pozadina svetla, pa ovi elementi moraju svoje izuzetke. */
:root[data-theme="ocean"] .app-topbar .logo img { filter: none; }
:root[data-theme="ocean"] .credit-pill { background: #eff6ff; color: #2563eb; }
:root[data-theme="ocean"] .credit-pill .icon { color: #ca8a04; }
:root[data-theme="ocean"] .icon-btn:hover { background: #eff6ff; }
:root[data-theme="ocean"] .app-search input { background: #f5f9fc; }
:root[data-theme="ocean"] .app-search input:focus { border-color: #2563eb; }
:root[data-theme="ocean"] .credit-pill:hover { border-color: #93c5fd; }

* { box-sizing: border-box; }

/* OSNOVNA ZAŠTITA: bez ovoga se svaka slika čije pravilo nije eksplicitno
   ograničeno renderuje u PUNOJ veličini i izlazi van ekrana na telefonu.
   Ovo je bio uzrok "šetanja" ekrana levo-desno. */
img, video, iframe, canvas, svg { max-width: 100%; }
img, video { height: auto; }

/* Osigurač protiv horizontalnog prelivanja.
   VAŽNO: 'clip', NE 'hidden' - 'hidden' pravi novi kontekst skrolovanja i
   POKVARI position:sticky na sidebar-u (provereno). 'clip' seče isto, ali
   sticky nastavlja da radi. Na starijim browserima se prosto ne primeni,
   a pravi uzrok (slike bez ograničenja) je ionako rešen gore. */
html, body { overflow-x: clip; max-width: 100%; }

/* Flex/grid deca podrazumevano ne mogu ispod svog sadržaja - bez min-width:0
   dugačak tekst ili slika razvlače ceo kontejner van ekrana. */
.app-main, .container, .container-wide, .match-card, .conv-list, .thread-pane { min-width: 0; }

body { transition: background-color .15s ease, color .15s ease; }

.icon { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.btn .icon { width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.navbar .logo {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.navbar .logo img {
    width: 180px;
    height: auto;
    display: block;
}

.navbar a.nav-link {
    font-size: 14px;
    color: var(--text-muted);
    margin-left: 24px;
}

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

.page-center {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
p.subtitle { color: var(--text-muted); font-size: 15px; margin: 0 0 32px; }

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=search], input[type=date], input[type=password], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
    margin-bottom: 18px;
    transition: border-color .15s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

textarea { resize: vertical; min-height: 100px; }

.btn {
    display: inline-block;
    width: 100%;
    padding: 13px 20px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: opacity .15s ease;
}

.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.checkbox-row input { margin-top: 3px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

.footer-link {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 24px;
}

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }

.chip {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    background: var(--surface);
    color: var(--text);
    transition: all .15s ease;
}

.chip.selected {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
}

.step-indicator {
    display: flex;
    gap: 6px;
    margin-bottom: 28px;
}

.step-dot {
    height: 4px;
    flex: 1;
    border-radius: 2px;
    background: var(--border);
}

.step-dot.active { background: var(--accent); }

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width .3s ease;
}

/* --- AI Match kartice --- */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.match-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.match-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
}

.avatar-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-contrast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.match-name { font-weight: 600; font-size: 15px; }
.match-meta { font-size: 13px; color: var(--text-muted); }

.match-score {
    margin-left: auto;
    background: #f0fdf4;
    color: var(--success);
    font-weight: 700;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 999px;
}

.match-reasons {
    border-top: 1px solid var(--border);
    padding: 16px 0;
}

.match-reasons-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.match-reasons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.match-reasons li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.match-reasons li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.match-reasons li:first-child {
    padding-top: 9px;
}

.reason-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgba(22,163,74,0.12);
    color: var(--success);
    flex-shrink: 0;
    margin-top: 1px;
}

.reason-check .icon { width: 10px; height: 10px; }

.match-actions {
    display: flex;
    gap: 8px;
    padding-top: 14px;
}

.match-actions:first-of-type {
    border-top: 1px solid var(--border);
}

.match-skip-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12.5px;
    cursor: pointer;
    padding: 2px 0;
    text-decoration: underline;
}
.match-skip-link:hover { color: var(--text); }

.contact-locked {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}
.contact-locked .icon { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; margin-top: 2px; }
.contact-locked p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.6; }

.skill-levels-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 10px 0 20px;
}

.skill-level-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.skill-level-name { font-size: 13px; color: var(--text); }

.skill-level-stars { display: flex; gap: 2px; }

.skill-star {
    cursor: pointer;
    font-size: 16px;
    color: var(--border);
    user-select: none;
    line-height: 1;
}
.skill-star.filled { color: #ca8a04; }

.theme-swatch-row { display: flex; gap: 12px; }

.theme-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.theme-swatch.active { border-color: var(--accent); }

.theme-swatch-preview {
    display: block;
    width: 56px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}
.theme-swatch-svetla { background: linear-gradient(135deg, #fafafa 50%, #111214 50%); }
.theme-swatch-tamna { background: linear-gradient(135deg, #0f1115 50%, #6d5fa0 50%); }
.theme-swatch-ocean { background: linear-gradient(135deg, #f5f9fc 50%, #2563eb 50%); }

/* --- Speed Match (fullscreen, bez sidebar-a) --- */
.app-main-full {
    min-height: calc(100vh - 68px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: var(--bg);
}

.speed-match-header {
    text-align: center;
    margin-bottom: 24px;
}
.speed-match-header h1 { margin-bottom: 4px; }

.speed-saved-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.speed-saved-link:hover { background: var(--bg); }

.speed-outer {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 1080px;
}

.speed-arrow {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.speed-arrow .icon { width: 18px; height: 18px; }
.speed-arrow:hover { color: var(--text); }
.speed-arrow:disabled { opacity: 0.35; cursor: default; }
.speed-arrow:disabled:hover { color: var(--text-muted); }

.speed-card-wrap {
    position: relative;
    flex: 1;
    min-height: 560px;
}

.speed-card-wide {
    position: absolute;
    inset: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    padding: 28px;
    transition: transform .25s ease, opacity .25s ease;
    overflow-y: auto;
}
.speed-card-wide.exit-left { transform: translateX(-120%) rotate(-6deg); opacity: 0; }
.speed-card-wide.exit-right { transform: translateX(120%) rotate(6deg); opacity: 0; }

.speed-tier-badge { float: right; }

.speed-card-wide-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 32px;
    margin-top: 8px;
}

.speed-photo-wrap { position: relative; width: 110px; margin-bottom: 16px; }
.speed-photo {
    width: 110px; height: 110px; border-radius: 50%;
    background: var(--accent); color: var(--accent-contrast);
    display: flex; align-items: center; justify-content: center;
    font-size: 34px; font-weight: 700; text-transform: uppercase;
    overflow: hidden;
}
.speed-photo img { width: 100%; height: 100%; object-fit: cover; }
.speed-online-badge {
    position: absolute; bottom: 0; right: 0;
    background: #f0fdf4; color: var(--success);
    font-size: 11px; font-weight: 700;
    padding: 3px 8px; border-radius: 999px;
    border: 2px solid var(--surface);
}

.speed-name-row { display: flex; align-items: center; gap: 8px; }
.speed-name { font-size: 21px; font-weight: 700; }
.speed-linkedin-badge {
    width: 22px; height: 22px; border-radius: 5px;
    background: #0a66c2; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}
.speed-headline { font-size: 14.5px; color: var(--text); margin-top: 2px; }
.speed-location { font-size: 13px; color: var(--text-muted); margin: 4px 0 14px; }
.speed-bio { font-size: 13.5px; line-height: 1.6; color: var(--text); margin: 0 0 18px; }

.speed-section-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 8px; }
.speed-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }

.speed-card-right { border-left: 1px solid var(--border); padding-left: 28px; }

.speed-info-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.speed-info-label { font-size: 11.5px; color: var(--text-muted); }
.speed-info-value { font-size: 14px; font-weight: 600; }
.speed-compat-pct { font-size: 22px; font-weight: 800; color: var(--success); }
.speed-info-sub { font-size: 12px; color: var(--text-muted); }

.speed-why-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
}
.speed-why-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.speed-why-box ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.speed-why-box li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }

@media (max-width: 800px) {
    .speed-outer { flex-direction: column; }
    .speed-arrow { display: none; }
    .speed-card-wide-grid { grid-template-columns: 1fr; gap: 0; }

    /* Na telefonu kartica mora da STANE BEZ SKROLOVANJA - zato skraćujemo
       tekst i sklanjamo detalje. Ko želi više, otvara profil.
       VAŽNO: flex mora na 'none', inače flex-basis:0 poništava zadatu visinu. */
    /* Na telefonu se prikazuje samo JEDNA kartica (JS sakriva ostale), pa ne
       mora da bude apsolutno pozicionirana - neka se sama prilagodi sadržaju.
       Time nema ni skrolovanja unutar kartice ni praznog prostora. */
    .speed-card-wrap { flex: none; min-height: 0; height: auto; width: 100%; }
    .speed-card-wide { position: relative; inset: auto; padding: 16px; overflow: hidden; }

    /* Zaglavlje stranice zauzima manje mesta, da ostane karticu */
    .speed-match-header { margin-bottom: 14px; }
    .speed-match-header h1 { font-size: 22px; }
    .speed-match-header .subtitle { display: none; }
    .app-main-full { padding: 16px 16px 20px; justify-content: flex-start; }

    /* Manja slika, ime i naslov zbijeniji */
    .speed-photo-wrap, .speed-photo { width: 60px; height: 60px; }
    .speed-photo { font-size: 20px; }
    .speed-photo-wrap { margin-bottom: 8px; }
    .speed-name { font-size: 17px; }
    .speed-headline { font-size: 12.5px; }
    .speed-location { font-size: 12px; margin: 2px 0 8px; }

    /* Opis skraćen na 2 reda umesto celog teksta */
    .speed-bio {
        font-size: 12.5px;
        line-height: 1.5;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Desna kolona: sklanjamo sve osim kompatibilnosti - to je jedini
       podatak koji stvarno pomaže brzoj odluci */
    .speed-card-right {
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 12px 0 0;
        margin-top: 4px;
    }
    .speed-card-right .speed-info-row { margin-bottom: 0; }
    .speed-card-right .speed-info-row:not(.speed-info-compat) { display: none; }
    .speed-why-box { display: none; }

    /* Samo prvi red oznaka, bez prelamanja u više redova */
    .speed-chip-row {
        flex-wrap: nowrap;
        overflow: hidden;
        margin-bottom: 10px;
    }
    .speed-section-label { margin-bottom: 5px; }

    .speed-match-hint { display: none; }
    .speed-match-actions { margin-top: 16px; gap: 10px; }
    .speed-pill { padding: 11px 16px; font-size: 13px; }
    .speed-pill-save { padding: 12px 20px; font-size: 14px; }
}

/* Na NISKIM telefonima (stariji Android, ~640px) sklanjamo i "Traži"
   sekciju - bolje da sve stane nego da korisnik mora da skroluje. */
@media (max-width: 800px) and (max-height: 720px) {
    .speed-card-left .speed-section-label:last-of-type,
    .speed-card-left .speed-chip-row:last-of-type { display: none; }
    .speed-bio { -webkit-line-clamp: 2; }
    .speed-match-header { margin-bottom: 8px; }
    .speed-match-header h1 { font-size: 20px; margin-bottom: 2px; }
    .speed-saved-link { margin-top: 6px; padding: 6px 12px; font-size: 12px; }
    .speed-card-wide { padding: 14px; }
    .speed-photo-wrap, .speed-photo { width: 52px; height: 52px; }
    .speed-photo { font-size: 18px; }
    .speed-match-actions { margin-top: 10px; }
    .speed-pill { padding: 10px 14px; }
    .speed-pill-save { padding: 11px 18px; }
    .app-main-full { padding: 12px 14px 16px; }
}

.speed-match-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.speed-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.speed-pill .icon { width: 18px; height: 18px; }

.speed-pill-skip { color: var(--error); border-color: #fecaca; }
.speed-pill-profile { color: var(--text-muted); }

.speed-pill-save {
    background: #7c3aed;
    color: #fff;
    border: none;
    padding: 13px 26px;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}
.speed-pill-save:hover { background: #6d28d9; }

.speed-match-empty {
    text-align: center;
    max-width: 340px;
}

.speed-match-hint {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.btn-sm {
    width: auto;
    flex: 1;
    padding: 9px 12px;
    font-size: 13px;
}

.match-card.removing {
    opacity: 0;
    transform: scale(0.96);
    transition: all .2s ease;
}

/* --- Homepage hero --- */
.hero {
    position: relative;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: linear-gradient(120deg, rgba(15,17,20,0.88) 0%, rgba(15,17,20,0.55) 45%, rgba(15,17,20,0.25) 100%), url('/assets/images/Spajalica_bckg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
}

.hero-content { max-width: 680px; padding: 80px max(64px, 6vw) 60px; flex: 1; display: flex; flex-direction: column; justify-content: center; }

.hero h1 {
    font-size: 60px;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
    color: #fff;
}

.hero p.subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 17px;
    margin: 0 0 32px;
    max-width: 480px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-user-count { margin: 18px 0 0; font-size: 13.5px; color: rgba(255,255,255,0.65); }
.hero-user-count strong { color: #fff; }

.hero .btn { width: auto; padding: 14px 26px; }

.hero .btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    width: auto;
    padding: 14px 26px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
}

.hero .btn-ghost:hover { background: rgba(255,255,255,0.1); }

.hero-features-strip {
    background: rgba(10,11,13,0.72);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 26px max(64px, 6vw);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.hero-feature-item { display: flex; align-items: flex-start; gap: 12px; }
.hero-feature-item .icon { width: 26px; height: 26px; flex-shrink: 0; color: #fff; opacity: 0.9; margin-top: 2px; }
.hero-feature-item h4 { font-size: 14px; font-weight: 600; color: #fff; margin: 0 0 4px; }
.hero-feature-item p { font-size: 12.5px; color: rgba(255,255,255,0.65); margin: 0; line-height: 1.4; }

@media (max-width: 900px) {
    .hero-features-strip { grid-template-columns: repeat(2, 1fr); }
}

.home-cta-banner {
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: 64px 24px;
}

.home-cta-banner h2 { color: #fff; font-size: 26px; margin: 0 0 12px; }
.home-cta-banner p { color: rgba(255,255,255,0.75); margin: 0 0 28px; }
.home-cta-banner .btn { width: auto; padding: 14px 30px; background: #fff; color: #111; }

.home-share-row {
    background: var(--accent);
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 24px 24px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.home-share-row .social-share-label { color: rgba(255,255,255,0.65); }

.home-share-row .social-btn {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}

.home-share-row .social-btn:hover { background: #fff; color: #111; border-color: #fff; }

/* --- Kako funkcioniše --- */
.how-it-works {
    background: #0d0e11;
    color: #fff;
    padding: 72px 24px;
    text-align: center;
}

.how-eyebrow {
    color: #a78bfa;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.how-title { font-size: 28px; margin: 0 0 52px; color: #fff; }

.how-steps {
    display: flex;
    justify-content: center;
    gap: 56px;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.how-step { max-width: 220px; }

.how-step-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(124,58,237,0.18);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    color: #a78bfa;
}
.how-step-icon .icon { width: 26px; height: 26px; }
.how-step h3 { font-size: 15px; margin: 0 0 6px; color: #fff; }
.how-step p { font-size: 13px; color: rgba(255,255,255,0.6); margin: 0; line-height: 1.6; }

/* --- Zajednica / testimonijali --- */
.community-section {
    background: #0d0e11;
    color: #fff;
    padding: 72px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.community-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(240px, 340px) 1fr;
    gap: 48px;
    align-items: center;
}

.community-inner h2 { font-size: 28px; margin: 10px 0 14px; color: #fff; }
.community-inner p.community-desc { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.7; margin: 0 0 24px; }

.testimonial-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    scrollbar-width: none;
}
.testimonial-scroller::-webkit-scrollbar { display: none; }

.testimonial-page {
    display: flex;
    gap: 20px;
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.testimonial-card {
    background: #16181c;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 22px;
    flex: 1;
    min-width: 0;
}

.testimonial-quote-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(124,58,237,0.18);
    display: flex; align-items: center; justify-content: center;
    color: #a78bfa;
    margin-bottom: 14px;
}
.testimonial-quote-icon .icon { width: 16px; height: 16px; }

.testimonial-text { font-size: 13.5px; color: rgba(255,255,255,0.8); line-height: 1.6; margin: 0 0 18px; min-height: 66px; }

.testimonial-author { display: flex; align-items: center; gap: 10px; }
.testimonial-author img, .testimonial-author .avatar-circle { width: 36px; height: 36px; font-size: 13px; }
.testimonial-author-name { font-size: 13px; font-weight: 600; color: #fff; }
.testimonial-author-role { font-size: 12px; color: rgba(255,255,255,0.5); }

.testimonial-dots { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.testimonial-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.25); border: none; cursor: pointer; padding: 0; }
.testimonial-dot.active { background: #a78bfa; width: 20px; border-radius: 4px; transition: all .2s ease; }

@media (max-width: 800px) {
    .community-inner { grid-template-columns: 1fr; }
    .testimonial-page { flex-direction: column; }
}

/* --- CTA baner sa avatarima --- */
.home-cta-banner-v2 {
    background: linear-gradient(120deg, #2e1065 0%, #4c1d95 100%);
    color: #fff;
    text-align: center;
    padding: 64px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.cta-avatar-stack { display: flex; }
.cta-avatar-stack .avatar-circle {
    width: 44px; height: 44px; font-size: 14px;
    border: 3px solid #3b0764;
    margin-left: -14px;
}
.cta-avatar-stack .avatar-circle:first-child { margin-left: 0; }

.home-cta-banner-v2 h2 { color: #fff; font-size: 26px; margin: 0 0 10px; }
.home-cta-banner-v2 p { color: rgba(255,255,255,0.75); margin: 0 0 22px; }
.home-cta-banner-v2 .btn { width: auto; padding: 14px 30px; background: #fff; color: #4c1d95; }

@media (max-width: 700px) {
    .home-cta-banner-v2 { flex-direction: column; }
}

/* --- Footer (gost) --- */
.site-footer {
    background: #000;
    color: rgba(255,255,255,0.55);
    padding: 56px 24px 28px;
}

.site-footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr repeat(5, 1fr);
    gap: 28px;
}

.site-footer-brand img { width: 130px; filter: brightness(0) invert(1); margin-bottom: 12px; }
.site-footer-brand p { font-size: 13px; line-height: 1.6; max-width: 220px; }

.site-footer h4 { color: #fff; font-size: 13px; margin: 0 0 14px; }
.site-footer a { display: block; color: rgba(255,255,255,0.55); font-size: 13px; margin-bottom: 10px; }
.site-footer a:hover { color: #fff; }

.site-footer-social { display: flex; gap: 10px; }
.site-footer-social a {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    margin: 0;
}
.site-footer-social a:hover { background: rgba(255,255,255,0.18); }
.site-footer-social .icon { width: 14px; height: 14px; }

.site-footer-bottom {
    max-width: 1100px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 800px) {
    .site-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .hero { min-height: 520px; }
    .hero h1 { font-size: 38px; }
    .hero-content { padding: 60px 20px 40px; }
    .hero-features-strip { grid-template-columns: 1fr; padding: 20px 20px; }
}
.nav-badge {
    background: var(--error);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    margin-left: 2px;
}

/* --- Poruke --- */
.messages-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - 68px - 64px);
    margin: -32px -40px;
    border-top: 1px solid var(--border);
    min-width: 0;
}

/* Na mobilnom prikazujemo JEDAN panel u isto vreme (lista ILI razgovor),
   umesto da se dve kolone preliju van ekrana. Koja se vidi zavisi od toga
   da li je razgovor otvoren - klasa .has-active dolazi sa servera. */
@media (max-width: 820px) {
    .messages-layout {
        grid-template-columns: 1fr;
        margin: -32px -20px;
        height: calc(100vh - 68px);
    }
    .messages-layout .conv-list { border-right: none; }
    .messages-layout.has-active .conv-list { display: none; }
    .messages-layout:not(.has-active) .thread-pane { display: none; }
    .thread-back-link { display: inline-flex !important; }
    .msg-bubble { max-width: 85%; }
    .thread-header, .thread-form { padding-left: 16px; padding-right: 16px; }
    .thread-messages { padding-left: 16px; padding-right: 16px; }
}

.thread-back-link {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-right: 2px;
}
.thread-back-link:hover { background: var(--bg); color: var(--text); }
.thread-back-link .icon { width: 18px; height: 18px; }

.conv-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 2;
}
.conv-tab {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
}
.conv-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.conv-tab:hover { background: var(--bg); }

.thread-actions { position: relative; margin-left: 8px; }
.thread-actions-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1;
}
.thread-actions-toggle:hover { background: var(--bg); color: var(--text); }

.thread-actions-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    min-width: 190px;
    z-index: 30;
    overflow: hidden;
}
.thread-actions-menu.open { display: block; }
.thread-actions-menu form { margin: 0; }
.thread-actions-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
}
.thread-actions-menu button:hover { background: var(--bg); }
.thread-actions-menu button.danger { color: var(--error); }

/* Mobilna traka sa obaveštenjima - na desktopu su ikonice u topbar-u dovoljne */
.mobile-alert-bar { display: none; }
@media (max-width: 900px) {
    .mobile-alert-bar {
        display: flex;
        gap: 8px;
        padding: 10px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
        scrollbar-width: none;
    }
    .mobile-alert-bar::-webkit-scrollbar { display: none; }
    .mobile-alert-item {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 14px 7px 7px;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 999px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        white-space: nowrap;
        flex-shrink: 0;
    }
    .mobile-alert-item .sidebar-icon-badge { width: 24px; height: 24px; }
    .mobile-alert-item .icon { width: 13px; height: 13px; }
}

.conv-list {
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: var(--surface);
}

.conv-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.conv-item:hover, .conv-item.active { background: var(--bg); }

.conv-item-top { display: flex; justify-content: space-between; align-items: center; }
.conv-item-name { font-weight: 600; font-size: 14px; display:flex; align-items:center; gap:6px; }
.conv-item-preview { font-size: 13px; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.online-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; flex-shrink:0;
}
.offline-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--border); display: inline-block; flex-shrink:0;
}

.thread-pane { display: flex; flex-direction: column; height: 100%; }
.thread-header { padding: 16px 24px; border-bottom: 1px solid var(--border); font-weight: 600; display:flex; align-items:center; gap:8px; }
.thread-profile-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 999px;
}
.thread-profile-link:hover { color: var(--text); background: var(--bg); }
.thread-profile-link .icon { width: 13px; height: 13px; }
.thread-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 10px; }

.msg-bubble { max-width: 60%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.4; }
.msg-bubble ul { margin: 6px 0; padding-left: 20px; }
.msg-bubble a { text-decoration: underline; }
.msg-mine a { color: var(--accent-contrast); }
.msg-theirs a { color: var(--accent); }
.msg-mine { align-self: flex-end; background: var(--accent); color: var(--accent-contrast); border-bottom-right-radius: 4px; }
.msg-theirs { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); border-bottom-left-radius: 4px; }

.thread-form { padding: 12px 24px 16px; border-top: 1px solid var(--border); }

.editor-toolbar { display: flex; gap: 4px; margin-bottom: 6px; }
.editor-btn {
    width: 28px; height: 28px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.editor-btn:hover { background: var(--bg); color: var(--text); }

.thread-input-row { display: flex; gap: 10px; align-items: flex-end; }
.thread-input-row textarea {
    margin-bottom: 0;
    flex: 1;
    resize: none;
    max-height: 140px;
    font-family: inherit;
    padding: 10px 14px;
}
.thread-input-row button { width: auto; padding: 12px 20px; flex-shrink: 0; }

.empty-state { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); font-size: 14px; }

/* --- Notifikacije --- */
.notif-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.notif-item.unread { background: #fafafa; font-weight: 600; }
.notif-time { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }

/* --- Knowledge Hub članak --- */
.knowledge-body { font-size: 15px; line-height: 1.75; color: var(--text); margin: 28px 0 36px; }
.knowledge-body h2 { font-size: 20px; margin: 32px 0 12px; }
.knowledge-body h3 { font-size: 17px; margin: 24px 0 10px; }
.knowledge-body p { margin: 0 0 16px; }
.knowledge-body ul, .knowledge-body ol { margin: 0 0 16px; padding-left: 22px; }
.knowledge-body li { margin-bottom: 6px; }
.knowledge-body a { color: var(--accent); text-decoration: underline; }
.knowledge-body strong { font-weight: 600; }

.knowledge-category-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 44px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.knowledge-category-title:first-of-type { margin-top: 0; }

/* --- AI Business DNA --- */
.business-dna-block {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.business-dna-chart { flex-shrink: 0; width: 260px; }

.business-dna-bars { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 10px; }

.dna-bar-row { display: flex; align-items: center; gap: 10px; }
.dna-bar-label { font-size: 12.5px; color: var(--text-muted); width: 90px; flex-shrink: 0; }
.dna-bar-value { font-size: 12.5px; font-weight: 600; width: 34px; text-align: right; flex-shrink: 0; }

@media (max-width: 560px) {
    .business-dna-chart { width: 100%; max-width: 260px; margin: 0 auto; }
}

/* --- Social share --- */
.social-share {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.social-share-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 4px;
}

.social-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: all .15s ease;
}

.social-btn:hover { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }

/* ============================================================
   APP SHELL - crni top bar + sidebar (za ulogovane korisnike)
   ============================================================ */
:root {
    --app-bar-bg: #16181c;
    --app-bar-text: #e8e9eb;
    --app-bar-text-muted: #9aa1ab;
    --app-bar-border: #2a2d33;
    --sidebar-bg: #ffffff;
    --sidebar-active-bg: #f1eefc;
    --sidebar-active-text: #6d28d9;
}

body.has-app-shell { margin: 0; }

.app-topbar {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
    padding: 0 24px;
    background: var(--app-bar-bg);
    color: var(--app-bar-text);
    position: sticky;
    top: 0;
    z-index: 40;
}

.app-topbar .logo img {
    width: 150px;
    filter: brightness(0) invert(1);
}

.app-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.app-search input {
    width: 100%;
    background: #212328;
    border: 1px solid var(--app-bar-border);
    color: var(--app-bar-text);
    border-radius: 10px;
    padding: 9px 14px 9px 38px;
    font-size: 14px;
    margin: 0;
}

.app-search input::placeholder { color: var(--app-bar-text-muted); }
.app-search input:focus { border-color: #4b4f58; outline: none; }

.app-search .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--app-bar-text-muted);
}

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

.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--app-bar-text);
    background: transparent;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
}

.icon-btn:hover { background: #212328; }
.icon-btn .icon { width: 20px; height: 20px; }

.credit-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #212328;
    border: 1px solid var(--app-bar-border);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 999px;
}
.credit-pill .icon { width: 15px; height: 15px; color: #facc15; }
.credit-pill:hover { border-color: #4b4f58; }

.icon-btn-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--app-bar-bg);
}

.user-menu { position: relative; }

.user-menu summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
}

.user-menu summary::-webkit-details-marker { display: none; }

.user-menu-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #3a3d44;
}

.user-menu-name { font-size: 13px; font-weight: 600; color: var(--app-bar-text); line-height: 1.3; }
.user-menu-role { font-size: 11px; color: var(--app-bar-text-muted); }
.user-menu .icon.chevron { width: 14px; height: 14px; color: var(--app-bar-text-muted); }

.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    min-width: 180px;
    padding: 6px;
    z-index: 50;
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
}

.user-menu-dropdown a:hover { background: var(--bg); }
.user-menu-dropdown .icon { width: 16px; height: 16px; color: var(--text-muted); }

.app-body { display: flex; min-height: calc(100vh - 68px); }

.app-sidebar {
    width: 232px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    /* Sopstveno skrolovanje - bez ovoga se na nizim ekranima donji deo
       (Floli baner, Odjava) odseca i korisnik ne moze da ga dohvati. */
    position: sticky;
    top: 68px;
    height: calc(100vh - 68px);
    overflow-y: auto;
}
.app-sidebar::-webkit-scrollbar { width: 5px; }
.app-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Baneri ne smeju da se sabijaju kad je malo mesta - radije neka se skroluje */
.app-sidebar-footer,
.referral-banner,
.floli-banner { flex-shrink: 0; }

.app-sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 2px;
    font-weight: 500;
}

.app-sidebar-nav-link:hover { background: var(--bg); }

.app-sidebar-nav-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 600;
}

.sidebar-group-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 14px 10px 6px;
}
.sidebar-group-label:first-child { padding-top: 4px; }

.sidebar-icon-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-icon-badge .icon { width: 16px; height: 16px; }

.badge-purple { background: #ede9fe; color: #7c3aed; }
.badge-blue   { background: #dbeafe; color: #2563eb; }
.badge-green  { background: #dcfce7; color: #16a34a; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.badge-pink   { background: #fce7f3; color: #db2777; }
.badge-yellow { background: #fef9c3; color: #ca8a04; }
.badge-gray-soft { background: #f1f2f4; color: #4b5563; }
.badge-red { background: #fee2e2; color: #dc2626; }

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
    border: none;
}

.sidebar-count {
    margin-left: auto;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
}

.app-sidebar-footer { margin-top: auto; padding-top: 16px; }

.floli-banner {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.floli-banner-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: #fff; display: flex; align-items: center; justify-content: center;
    color: #4f46e5; margin-bottom: 10px;
}
.floli-banner-icon .icon { width: 16px; height: 16px; }
.floli-banner-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: #1e1b4b; }
.floli-banner-text { font-size: 12px; color: #52525b; line-height: 1.4; margin: 0 0 10px; }
.floli-banner-btn { font-size: 12px; font-weight: 600; color: #4f46e5; }

.referral-banner {
    background: linear-gradient(135deg, #fefce8 0%, #fff7ed 100%);
    border: 1px solid #fde68a;
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.referral-banner-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: #fff; display: flex; align-items: center; justify-content: center;
    color: #ca8a04; margin-bottom: 10px;
}
.referral-banner-icon .icon { width: 16px; height: 16px; }
.referral-banner-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: #78350f; }
.referral-banner-text { font-size: 12px; color: #78716c; line-height: 1.4; margin: 0 0 10px; }

.referral-link-row {
    display: flex;
    gap: 6px;
}

.referral-link-row input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 7px 9px;
    font-size: 11px;
    border-radius: 8px;
    border: 1px solid #fde68a;
    background: #fff;
    color: #57534e;
}

.referral-link-row button {
    flex-shrink: 0;
    width: 32px;
    border: 1px solid #fde68a;
    background: #fff;
    color: #ca8a04;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.referral-link-row button .icon { width: 14px; height: 14px; }
.referral-link-row button:hover { background: #fef3c7; }

.app-main { flex: 1; padding: 32px 40px; background: var(--bg); min-width: 0; }

/* Stat kartice sa pastelnim icon bedžom (Dashboard/Business Hub) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card-v2 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}

.stat-card-v2 .icon-badge-lg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 14px;
}

.stat-card-v2 .icon-badge-lg .icon { width: 20px; height: 20px; }
.stat-card-v2 .stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-card-v2 .stat-label { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.stat-card-v2 .stat-delta { font-size: 12px; color: var(--success); margin-top: 8px; font-weight: 600; }
.stat-card-v2 .stat-delta.neutral { color: var(--text-muted); font-weight: 500; }

.tool-card-name { font-size: 15px; font-weight: 700; line-height: 1.35; margin-bottom: 4px; }
.tool-card-price { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }

/* --- Kartica AI alata sa featured slikom --- */
.tool-card.has-image {
    padding: 10px 10px 18px;
    gap: 0;
}

.tool-card-media {
    position: relative;
    border-radius: 12px;
    overflow: visible;
    margin-bottom: 30px;
}

.tool-card-media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
}

/* Ikonica se preklapa preko donje ivice slike, kao na mokapu */
.tool-card-icon {
    position: absolute;
    left: 10px;
    bottom: -20px;
    border: 3px solid var(--surface);
    box-shadow: var(--shadow);
}

.tool-card.has-image .tool-card-body {
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Bez slike - stara struktura ostaje netaknuta */
.tool-card:not(.has-image) .tool-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

/* --- Baner za kurs AI Prompt Dizajner --- */
.kurs-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(120deg, #1f2937 0%, #4c1d95 100%);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-top: 40px;
    color: #fff;
}

.kurs-banner-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.kurs-banner-icon .icon { width: 22px; height: 22px; color: #fff; }

.kurs-banner-text { flex: 1; min-width: 0; }
.kurs-banner-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.kurs-banner-text p { font-size: 13.5px; color: rgba(255,255,255,0.75); margin: 0; line-height: 1.6; }

.kurs-banner-btn {
    width: auto;
    flex-shrink: 0;
    background: #fff;
    color: #1f2937;
    padding: 12px 22px;
}
.kurs-banner-btn:hover { background: #f1f2f4; }

@media (max-width: 720px) {
    .kurs-banner { flex-direction: column; align-items: flex-start; text-align: left; }
    .kurs-banner-btn { width: 100%; text-align: center; }
}

/* --- AI Business Academy: Prompt Library --- */
.academy-hero { margin-bottom: 24px; }
.academy-hero h1 { margin: 6px 0 6px; }

.academy-search {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 620px;
    margin-top: 18px;
}
.academy-search > .icon {
    position: absolute;
    left: 14px;
    width: 17px; height: 17px;
    color: var(--text-muted);
    pointer-events: none;
}
.academy-search input {
    flex: 1;
    margin: 0;
    padding-left: 40px;
}
.academy-search .btn { width: auto; flex-shrink: 0; }

.academy-subfilters {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.academy-subfilter-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.academy-subfilters .tag-pill { text-decoration: none; }

.prompt-card { position: relative; }
.prompt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.prompt-fav {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--border);
    padding: 2px 4px;
    flex-shrink: 0;
}
.prompt-fav:hover { color: #ca8a04; }
.prompt-fav.active { color: #ca8a04; }

.prompt-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.prompt-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}
.prompt-meta { font-size: 11.5px; color: var(--text-muted); }
.prompt-card-foot .btn { width: auto; padding: 7px 14px; font-size: 12.5px; flex-shrink: 0; }
.prompt-copy.kopirano { background: #f0fdf4; color: var(--success); border-color: #bbf7d0; }

/* --- Boks sa promptom na stranici detalja --- */
.prompt-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px 20px;
    margin-top: 24px;
    max-width: 760px;
    box-shadow: var(--shadow);
}
.prompt-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}
.prompt-box-head .btn { width: auto; padding: 7px 16px; font-size: 12.5px; }
.prompt-box textarea {
    width: 100%;
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    line-height: 1.6;
    background: var(--bg);
    resize: vertical;
}

.prompt-open-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.prompt-open-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.prompt-open-row .btn { width: auto; padding: 8px 16px; font-size: 13px; }
.prompt-open-note { font-size: 12px; color: var(--text-muted); margin: 10px 0 0; }

@media (max-width: 620px) {
    .academy-search { flex-direction: column; align-items: stretch; }
    .academy-search .btn { width: 100%; }
    .prompt-card-foot { flex-direction: column; align-items: flex-start; }
    .prompt-card-foot .btn { width: 100%; }
}

/* --- Akademija: lekcije, napredak, bedževi --- */
.academy-progress {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-top: 20px;
    max-width: 460px;
    box-shadow: var(--shadow);
}
.academy-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.academy-progress-head strong { color: var(--text); font-size: 14px; }
.academy-progress-link { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--accent); }

.lesson-card { position: relative; }
.lesson-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lesson-card.zavrsena { border-color: #bbf7d0; }
.lesson-done { font-size: 11.5px; font-weight: 700; color: var(--success); }

.lesson-head { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.lesson-lead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    max-width: 720px;
    margin: 12px 0 24px;
}
.lesson-body { max-width: 720px; }

.lesson-takeaways {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-top: 28px;
    max-width: 720px;
}
.lesson-takeaways-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.lesson-takeaways ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.lesson-takeaways li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; line-height: 1.55; }

.lesson-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    max-width: 720px;
}
.lesson-footer .btn { width: auto; }

.badge-card { text-align: center; align-items: center; }
.badge-card .badge-emoji { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.badge-card:not(.osvojen) { opacity: 0.55; }
.badge-card:not(.osvojen) .badge-emoji { filter: grayscale(1); }

@media (max-width: 620px) {
    .lesson-footer .btn { width: 100%; }
}

/* --- Business Playbooks --- */
.pb-steps { max-width: 760px; margin-top: 28px; }

.pb-step {
    display: flex;
    gap: 16px;
    padding-bottom: 28px;
    position: relative;
}
/* Linija koja povezuje korake, osim posle poslednjeg */
.pb-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 40px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
}

.pb-step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-contrast);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.pb-step-body { flex: 1; min-width: 0; padding-top: 4px; }
.pb-step-body h3 { font-size: 16px; margin: 0 0 8px; }
.pb-step-body p { font-size: 14.5px; line-height: 1.7; margin: 0 0 12px; }

.pb-step-prompt {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 12px;
}
.pb-step-prompt-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 8px;
}
.pb-step-prompt-head .btn { width: auto; padding: 5px 12px; font-size: 12px; }
.pb-step-prompt pre {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text);
}

.pb-step-tip {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 10px 13px;
    font-size: 13px;
    color: #78350f;
}

.pb-checklist {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-top: 12px;
    max-width: 760px;
    box-shadow: var(--shadow);
}
.pb-checklist.sve-zavrseno { border-color: #bbf7d0; }
.pb-checklist-head {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 14px; font-weight: 700; margin-bottom: 14px;
}
.pb-checklist-count { font-size: 13px; color: var(--text-muted); font-weight: 600; }

.pb-check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.55;
    cursor: pointer;
}
.pb-check-item:last-of-type { border-bottom: none; }
.pb-check-item input { margin: 3px 0 0; flex-shrink: 0; width: 17px; height: 17px; cursor: pointer; }
.pb-check-item input:checked + span { text-decoration: line-through; color: var(--text-muted); }

.pb-checklist-note { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; }

@media (max-width: 620px) {
    .pb-step { gap: 12px; }
    .pb-step-num { width: 30px; height: 30px; font-size: 13px; }
    .pb-step:not(:last-child)::before { left: 14px; top: 34px; }
}

/* --- Zid za registraciju (Akademija) --- */
.lekcija-zid { position: relative; padding: 0 22px 26px 60px; }
.lekcija-zid-fade {
    /* Postepeno bledi tekst iznad, da se vidi da sadržaj ide dalje */
    position: absolute;
    top: -90px; left: 0; right: 0; height: 90px;
    background: linear-gradient(to bottom, transparent, var(--surface));
    pointer-events: none;
}
.lekcija-zid-sadrzaj {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 26px;
    text-align: center;
}
.lekcija-zid-sadrzaj .sidebar-icon-badge { width: 42px; height: 42px; margin: 0 auto 12px; }
.lekcija-zid-sadrzaj h3 { font-size: 17px; margin: 0 0 8px; }
.lekcija-zid-sadrzaj p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0 0 18px; max-width: 440px; margin-left: auto; margin-right: auto; }
.lekcija-zid-akcije { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.lekcija-zid-akcije .btn { width: auto; }
.lekcija-zid-note { font-size: 12px !important; margin: 14px 0 0 !important; }

.lekcija-toc-zakljucano {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 0; font-size: 12.5px; line-height: 1.45;
    color: var(--text-muted); opacity: 0.5;
    border-bottom: 1px solid var(--border);
}
.lekcija-toc-zakljucano:last-child { border-bottom: none; }
.lekcija-toc-zakljucano span { font-weight: 700; flex-shrink: 0; }

/* --- Zaključan prompt --- */
.prompt-zakljucan { position: relative; }
.prompt-zakljucan pre {
    margin: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px; line-height: 1.6;
    white-space: pre-wrap; word-break: break-word;
    color: var(--text-muted);
    max-height: 110px; overflow: hidden;
}
.prompt-zakljucan-zid {
    margin-top: 14px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    text-align: center;
}
.prompt-zakljucan-zid strong { display: block; font-size: 14.5px; margin-bottom: 6px; }
.prompt-zakljucan-zid p { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; }
.prompt-zakljucan-zid .btn { width: auto; margin: 0 4px; }

/* --- Oznaka da je stavka dostupna bez naloga --- */
.acad-oznaka-javno {
    display: inline-block;
    font-size: 10.5px; font-weight: 700;
    color: #16a34a; background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 2px 8px; border-radius: 999px;
}

@media (max-width: 720px) {
    .lekcija-zid { padding: 0 16px 20px 16px; }
    .lekcija-zid-akcije .btn { width: 100%; }
}

/* --- Test slanje najave (admin) --- */
.najava-test {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-top: 20px;
}
.najava-test-title { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.najava-test p { font-size: 12.5px; color: var(--text-muted); margin: 0 0 12px; line-height: 1.5; }
.najava-test label { font-size: 12px; }
.najava-test input { margin-bottom: 12px; }

/* ============================================================
   Stranica lekcije - hero, harmonika, desna kolona
   ============================================================ */
.lekcija-hero {
    background: linear-gradient(120deg, #16181c 0%, #2a1f4a 100%);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    padding: 38px 36px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.lekcija-hero.has-bg::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(12,10,20,0.95) 0%, rgba(12,10,20,0.8) 45%, rgba(12,10,20,0.4) 100%);
}
.lekcija-hero-inner { position: relative; max-width: 620px; color: #fff; }
.lekcija-hero-eyebrow {
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: #a99bd0; margin-bottom: 12px;
}
.lekcija-hero h1 { font-size: 30px; line-height: 1.22; color: #fff; margin: 0 0 12px; }
.lekcija-hero-opis { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,0.78); margin: 0 0 18px; }

.lekcija-hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.lekcija-hero-meta span {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; color: rgba(255,255,255,0.72);
}
.lekcija-hero-meta .icon { width: 14px; height: 14px; }

.lekcija-hero-actions { display: flex; align-items: center; gap: 10px; }
.lekcija-hero-btn { width: auto; background: #7c3aed; color: #fff; padding: 12px 22px; }
.lekcija-hero-btn:hover { background: #6d28d9; }
.lekcija-save {
    width: 42px; height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.1);
    color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.lekcija-save:hover { background: rgba(255,255,255,0.2); }
.lekcija-save.active { background: #fff; color: #7c3aed; border-color: #fff; }
.lekcija-save .icon { width: 18px; height: 18px; }

/* --- Dvokolonski raspored --- */
.lekcija-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}
.lekcija-glavno { min-width: 0; }

/* --- "Šta ćeš naučiti" --- */
.lekcija-nauci { margin-bottom: 20px; }
.lekcija-nauci-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.lekcija-nauci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}
.lekcija-nauci-item { display: flex; flex-direction: column; gap: 8px; }
.lekcija-nauci-item .sidebar-icon-badge { width: 34px; height: 34px; }
.lekcija-nauci-item > span:last-child { font-size: 12.5px; line-height: 1.45; color: var(--text); }

/* --- Harmonika sekcija --- */
.lekcija-sekcije {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.lekcija-sekcija { border-bottom: 1px solid var(--border); }
.lekcija-sekcija:last-child { border-bottom: none; }

.lekcija-sekcija-head {
    display: flex; align-items: flex-start; gap: 16px;
    width: 100%; text-align: left;
    background: none; border: none; cursor: pointer;
    padding: 20px 22px;
    font-family: inherit;
}
.lekcija-sekcija-head:hover { background: var(--bg); }
.lekcija-sekcija-num {
    font-size: 17px; font-weight: 800; color: var(--accent);
    opacity: 0.45; flex-shrink: 0; line-height: 1.3;
}
.lekcija-sekcija.otvorena .lekcija-sekcija-num { opacity: 1; }
.lekcija-sekcija-naslov { flex: 1; font-size: 15.5px; font-weight: 700; color: var(--text); line-height: 1.35; }
.lekcija-sekcija-strelica { flex-shrink: 0; color: var(--text-muted); transition: transform .2s; }
.lekcija-sekcija-strelica .icon { width: 18px; height: 18px; }
.lekcija-sekcija.otvorena .lekcija-sekcija-strelica { transform: rotate(180deg); }

.lekcija-sekcija-telo { display: none; padding: 0 22px 22px 60px; }
.lekcija-sekcija.otvorena .lekcija-sekcija-telo { display: block; }
.lekcija-sekcija-telo .knowledge-body { max-width: none; }
.lekcija-sekcija-telo p { font-size: 14.5px; line-height: 1.75; }

/* --- Prompt unutar lekcije --- */
.lekcija-prompt-row { display: grid; grid-template-columns: minmax(0,1fr) 170px; gap: 14px; }
.lekcija-prompt-box, .lekcija-prompt-alati {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.lekcija-prompt-label {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px;
}
.lekcija-prompt-box pre {
    margin: 0 0 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px; line-height: 1.6;
    white-space: pre-wrap; word-break: break-word; color: var(--text);
}
.lekcija-prompt-box .btn { width: auto; float: right; padding: 7px 16px; font-size: 12.5px; }
.lekcija-prompt-alati { display: flex; flex-direction: column; gap: 8px; }
.lekcija-alat {
    display: block; text-align: center;
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; color: var(--text);
}
.lekcija-alat:hover { border-color: var(--accent); }

/* --- Prethodna / sledeća --- */
.lekcija-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin-top: 22px;
}
.lekcija-nav-item {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    color: var(--text);
}
.lekcija-nav-item:hover { border-color: var(--accent); }
.lekcija-nav-item .icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.lekcija-nav-item span { display: block; font-size: 11.5px; color: var(--text-muted); margin-bottom: 2px; }
.lekcija-nav-item strong { font-size: 13.5px; line-height: 1.35; }
.lekcija-nav-next { text-align: right; justify-content: flex-end; }

/* --- Desna kolona --- */
.lekcija-strana { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 88px; }
.lekcija-kart { padding: 16px 18px; }
.lekcija-kart-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.lekcija-kart-sub { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.lekcija-kart .acad-ring-wrap { margin: 0 auto; }

.lekcija-toc { display: flex; flex-direction: column; }
.lekcija-toc a {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 0; font-size: 12.5px; line-height: 1.45;
    color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.lekcija-toc a:last-child { border-bottom: none; }
.lekcija-toc a:hover, .lekcija-toc a.active { color: var(--text); }
.lekcija-toc a span { font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.lekcija-toc a.active span { color: var(--accent); }

.lekcija-alati-lista { display: flex; flex-direction: column; gap: 2px; }
.lekcija-alat-red {
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    background: none; border: none; cursor: pointer;
    padding: 9px 8px; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 13px; color: var(--text);
}
.lekcija-alat-red:hover { background: var(--bg); }
.lekcija-alat-red .icon { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.lekcija-alat-red.zavrsena, .lekcija-alat-red.aktivna { color: var(--success); font-weight: 600; }
.lekcija-alat-red.zavrsena .icon, .lekcija-alat-red.aktivna .icon { color: var(--success); }

#lekcijaBeleska { width: 100%; margin: 0; font-size: 13px; resize: vertical; }
.lekcija-beleska-note { font-size: 11px; color: var(--text-muted); margin: 8px 0 0; }

.lekcija-strana-prompt {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11.5px; line-height: 1.55; color: var(--text-muted);
    white-space: pre-wrap; word-break: break-word;
    max-height: 130px; overflow: hidden;
}

.lekcija-studio p { font-size: 12.5px; line-height: 1.55; color: var(--text-muted); margin: 0 0 12px; }

/* --- Mobilno --- */
@media (max-width: 1000px) {
    .lekcija-layout { grid-template-columns: 1fr; }
    .lekcija-strana { position: static; }
}
@media (max-width: 720px) {
    .lekcija-hero { padding: 26px 20px; }
    .lekcija-hero h1 { font-size: 23px; }
    .lekcija-hero-btn { flex: 1; text-align: center; }
    .lekcija-sekcija-head { padding: 16px 16px; gap: 12px; }
    .lekcija-sekcija-telo { padding: 0 16px 18px 16px; }
    .lekcija-prompt-row { grid-template-columns: 1fr; }
    .lekcija-nav { grid-template-columns: 1fr; }
    .lekcija-nav-next { text-align: left; justify-content: flex-start; flex-direction: row-reverse; }
}

/* ============================================================
   Navigacija: tabovi Akademije, breadcrumb, AI Studio zaglavlje
   ============================================================ */

/* Omotač za NEPRIJAVLJENE korisnike. Prijavljeni dobijaju .app-main koji ima
   svoj padding; gost ga nema, pa bi bez ovoga sadržaj išao od ivice do ivice
   ekrana i tekst bi bio zalepljen za levu ivicu prozora. */
.public-main {
    display: block;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 40px;
    min-width: 0;
}
@media (max-width: 900px) {
    .public-main { padding: 24px 20px; }
}

/* Traka tabova ide punom širinom ekrana; unutrašnji omotač poravnava
   linkove sa sadržajem. Mora da radi u DVA konteksta:
   - prijavljen korisnik: unutar .app-main (ima padding 32px 40px)
   - gost: direktno u <body>, BEZ ijednog kontejnera
   Zato negativne margine idu samo u prvom slučaju - ranije su bile
   bezuslovne, pa su gostu izvlačile tabove gore pod topbar. */
.acad-tabs {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    margin-bottom: 24px;
}
.acad-tabs-inner {
    display: flex;
    gap: 4px;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.acad-tabs-inner::-webkit-scrollbar { display: none; }

/* Unutar app-shell-a: probij padding .app-main i poravnaj sa sadržajem */
.app-main > .acad-tabs,
.public-main > .acad-tabs { margin: -32px -40px 24px; }
.app-main .acad-tabs-inner,
.public-main .acad-tabs-inner { max-width: none; margin: 0; padding: 0 40px; }

.acad-tab {
    flex-shrink: 0;
    padding: 15px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}
.acad-tab:hover { color: var(--text); }
.acad-tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* Kad tabovi stoje iznad hero sekcije Akademije, hero ne sme da ima
   svoju gornju negativnu marginu - inace bi se popeo preko tabova */
.acad-tabs + .acad-hero { margin-top: 0; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.breadcrumb-sep { opacity: 0.5; }
.breadcrumb-current { color: var(--text); font-weight: 600; }

/* --- AI Studio zaglavlje --- */
.studio-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.studio-credits {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
    min-width: 170px;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}
.studio-credits-num { font-size: 30px; font-weight: 800; line-height: 1; color: #ca8a04; }
.studio-credits-label { font-size: 11.5px; color: var(--text-muted); margin: 4px 0 12px; }
.studio-credits .btn { width: 100%; padding: 8px 14px; font-size: 12.5px; }

@media (max-width: 900px) {
    .app-main > .acad-tabs,
    .public-main > .acad-tabs { margin: -24px -20px 20px; }
    .app-main .acad-tabs-inner,
    .public-main .acad-tabs-inner { padding: 0 20px; }
    .studio-head { flex-direction: column; }
    .studio-credits { width: 100%; }
}

/* ============================================================
   AI Business Academy - hero, napredak, kartice lekcija
   ============================================================ */

/* Hero se prostire preko celog glavnog kontejnera, pa negativne margine
   ponistavaju padding .app-main (32px 40px) */
.acad-hero {
    margin: -32px -40px 28px;  /* važi i u .public-main, isti padding */
    padding: 44px 40px;
    background: #16181c;
    background-size: cover;
    background-position: center right;
    position: relative;
    overflow: hidden;
}
/* Preliv preko slike - bez njega beli tekst nije citljiv na svetlim delovima */
.acad-hero.has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(10,11,13,0.94) 0%, rgba(10,11,13,0.82) 42%, rgba(10,11,13,0.35) 100%);
}

.acad-hero-inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    max-width: 1400px;
}

.acad-hero-text { flex: 1; min-width: 0; max-width: 560px; color: #fff; }
.acad-hero-eyebrow {
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em;
    text-transform: uppercase; color: rgba(255,255,255,0.72); margin-bottom: 14px;
}
.acad-hero-text h1 { font-size: 36px; line-height: 1.2; color: #fff; margin: 0 0 14px; }
.acad-hero-text p { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,0.78); margin: 0 0 24px; }

.acad-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.acad-btn-light { width: auto; background: #fff; color: #16181c; padding: 12px 22px; }
.acad-btn-light:hover { background: #eceef1; }
.acad-btn-ghost {
    width: auto; background: rgba(255,255,255,0.1); color: #fff;
    border: 1px solid rgba(255,255,255,0.28); padding: 12px 22px;
}
.acad-btn-ghost:hover { background: rgba(255,255,255,0.18); }

/* --- Kartica napretka --- */
.acad-progress-card {
    width: 250px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}
.acad-progress-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; }

.acad-ring-wrap { position: relative; width: 92px; height: 92px; margin: 0 auto; }
.acad-ring { width: 92px; height: 92px; transform: rotate(-90deg); }
.acad-ring circle { fill: none; stroke-width: 7; }
.acad-ring-bg { stroke: var(--border); }
.acad-ring-fg { stroke: #2563eb; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.acad-ring-pct {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; font-weight: 700;
}
.acad-progress-caption { text-align: center; font-size: 12px; color: var(--text-muted); margin: 6px 0 14px; }

.acad-progress-stats { display: flex; flex-direction: column; gap: 10px; }
.acad-stat { display: flex; align-items: center; gap: 10px; }
.acad-stat .sidebar-icon-badge { width: 30px; height: 30px; flex-shrink: 0; }
.acad-stat strong { display: block; font-size: 14px; line-height: 1.2; }
.acad-stat span { font-size: 11.5px; color: var(--text-muted); }

.acad-progress-link {
    display: block; margin-top: 14px; padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12.5px; font-weight: 600; color: #2563eb;
}

/* --- Alatna traka: pretraga + sortiranje --- */
.acad-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.acad-search { position: relative; display: flex; gap: 10px; align-items: center; flex: 1; max-width: 620px; }
.acad-search > .icon {
    position: absolute; left: 14px; width: 17px; height: 17px;
    color: var(--text-muted); pointer-events: none;
}
.acad-search input { flex: 1; margin: 0; padding-left: 40px; }
.acad-search .btn { width: auto; flex-shrink: 0; }

.acad-sort {
    display: flex; align-items: center; gap: 7px;
    font-size: 13px; color: var(--text-muted);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 9px 14px; background: var(--surface); flex-shrink: 0;
}
.acad-sort .icon { width: 15px; height: 15px; }
.acad-sort a { color: var(--text); font-weight: 600; }

/* Kategorije - horizontalno skrolovanje umesto prelamanja u vise redova */
.acad-chips {
    display: flex; gap: 8px; overflow-x: auto;
    padding-bottom: 6px; margin-bottom: 28px;
    scrollbar-width: thin;
}
.acad-chips::-webkit-scrollbar { height: 4px; }
.acad-chips::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.acad-chips .chip { flex-shrink: 0; }

.acad-section-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 18px;
}
.acad-section-head h2 { margin: 0 0 2px; }
.acad-section-head .subtitle { margin: 0; }
.acad-section-link { font-size: 13px; font-weight: 600; color: var(--accent); flex-shrink: 0; padding-top: 4px; }

/* --- Kartice lekcija --- */
.acad-lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 16px;
}
.acad-lesson-card {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
}
.acad-lesson-card:hover { border-color: var(--accent); }
.acad-lesson-card.zavrsena { border-color: #bbf7d0; }

.acad-lesson-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.acad-lesson-icon .icon { width: 19px; height: 19px; }

.acad-lesson-cat { font-size: 11.5px; color: var(--text-muted); margin-bottom: 5px; }
.acad-lesson-title { font-size: 15px; font-weight: 700; line-height: 1.35; margin-bottom: 7px; }
.acad-lesson-desc { font-size: 13px; line-height: 1.55; color: var(--text-muted); margin: 0 0 14px; }

.acad-lesson-meta {
    display: flex; gap: 14px; flex-wrap: wrap;
    font-size: 11.5px; color: var(--text-muted);
    margin-top: auto; padding-top: 4px;
}
.acad-lesson-meta span { display: inline-flex; align-items: center; gap: 4px; }
.acad-lesson-meta .icon { width: 13px; height: 13px; }

.acad-lesson-progress { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.acad-lesson-bar { flex: 1; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.acad-lesson-bar div { height: 100%; background: var(--accent); border-radius: 4px; }
.acad-lesson-card.zavrsena .acad-lesson-bar div { background: var(--success); }
.acad-lesson-progress span { font-size: 11px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }

/* --- Brzi pristup --- */
.acad-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}
.acad-quick {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px 16px;
    text-decoration: none; color: var(--text);
}
.acad-quick:hover { border-color: var(--accent); }
.acad-quick .sidebar-icon-badge { width: 36px; height: 36px; flex-shrink: 0; }
.acad-quick strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.acad-quick span { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.acad-quick-soon { opacity: 0.6; cursor: default; }
.acad-quick-soon:hover { border-color: var(--border); }
.acad-quick-soon em {
    font-style: normal; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--text-muted); margin-left: 5px;
}

/* --- Mobilni: hero bez slike, kartica napretka ispod teksta --- */
@media (max-width: 1100px) {
    .acad-hero-inner { flex-direction: column; }
    .acad-progress-card { width: 100%; max-width: 100%; }
}
@media (max-width: 900px) {
    .acad-hero {
        margin: -24px -20px 24px;
        padding: 28px 20px;
        /* Slika se NE prikazuje na telefonu - dogovoreno */
        background-image: none !important;
    }
    .acad-hero.has-bg::before { display: none; }
    .acad-hero-text h1 { font-size: 26px; }
    .acad-hero-text p { font-size: 14px; }
    .acad-hero-actions .btn { width: 100%; text-align: center; }
    .acad-toolbar { flex-direction: column; align-items: stretch; }
    .acad-search { max-width: 100%; flex-direction: column; align-items: stretch; }
    .acad-search .btn { width: 100%; }
    .acad-sort { justify-content: center; }
}

/* --- Knowledge Hub zaglavlje sa ilustracijom --- */
.knowledge-hero { overflow: hidden; }

.knowledge-hero-inner {
    padding: 36px 24px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.knowledge-hero-text { flex: 1; min-width: 0; }

.knowledge-hero-art {
    flex-shrink: 0;
    width: 44%;
    max-width: 480px;
    /* Blago izlazi van desne ivice, kao na mokapu */
    margin-right: -40px;
}
.knowledge-hero-art img {
    display: block;
    width: 100%;
    height: auto;
}

/* Ispod 900px ilustracija bi gušila tekst i chip-ove - sklanjamo je */
@media (max-width: 900px) {
    .knowledge-hero-art { display: none; }
    .knowledge-hero-inner { padding-bottom: 8px; }
}

.mutual-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(120deg, #2e1065, #4c1d95);
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    font-size: 13.5px;
    max-width: 420px;
    text-align: center;
    z-index: 200;
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
}

.mutual-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mutual-toast.info {
    background: #1f2328;
    max-width: 380px;
}

@media (max-width: 900px) {
    .app-sidebar { display: none; }
    .app-search { display: none; }
    .topbar-desktop-only { display: none !important; }
}

/* --- Top bar linkovi za goste (tamna pozadina) --- */
.topbar-link {
    color: var(--app-bar-text);
    font-size: 14px;
    font-weight: 500;
}

.topbar-link:hover { color: #fff; }

.topbar-cta {
    background: #fff;
    color: #111 !important;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
}

/* --- Hamburger dugme (samo mobilni) --- */
.hamburger-btn {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: transparent;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
    color: var(--app-bar-text);
}

.hamburger-btn .icon { width: 22px; height: 22px; }

@media (max-width: 900px) {
    .hamburger-btn { display: flex; }
}

/* --- Mobilni meni (drawer ispod topbar-a) --- */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px;
}

.mobile-menu.open { display: flex; }

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.mobile-menu-link:hover { background: var(--bg); }
.mobile-menu-link .sidebar-count { margin-left: auto; }
.mobile-menu-label { flex: 1; min-width: 0; }

.mobile-menu-group {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    padding: 16px 12px 6px;
}
.mobile-menu-group:first-child { padding-top: 6px; }

/* Broj kredita uz stavku "Krediti" - drugačiji od brojača nepročitanih,
   pa ne koristi crvenu tačku nego neutralnu oznaku */
.mobile-menu-meta {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: #ca8a04;
    background: #fef9c3;
    padding: 3px 9px;
    border-radius: 999px;
    flex-shrink: 0;
}

@media (min-width: 901px) {
    .mobile-menu { display: none !important; }
}
