/*
 * Astracia — dizajn sistem, deo 1: tokeni, osnova i školjka aplikacije (sidebar + traka).
 * Deo 2 (komponente) je u astracia-components.css, deo 3 (istraživanje) u astracia-research.css.
 * Učitava se posle devizzo.css iz core JAR-a i nadjačava ga; sve je vezano za body.astracia.
 */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap");

/* ── Tokeni ─────────────────────────────────────────────────────────────── */

body.astracia {
    --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

    --boja-tekst: #0f172a;
    --boja-tekst-2: #334155;
    --boja-tekst-tiho: #64748b;
    --boja-tekst-slabo: #94a3b8;
    --boja-pozadina: #f6f8fa;
    --boja-panel: #ffffff;
    --boja-panel-2: #f8fafc;
    --boja-ivica: #e2e8f0;
    --boja-ivica-jaka: #cbd5e1;

    --boja-akcent: #0f766e;
    --boja-akcent-tamna: #115e59;
    --boja-akcent-svetla: #ccfbf1;
    --boja-akcent-fon: #f0fdfa;
    --boja-akcent-tekst: #0d5f58;
    --boja-hover: #f0fdfa;

    --boja-uspeh-tekst: #166534;
    --boja-uspeh-pozadina: #dcfce7;
    --boja-uspeh: #16a34a;
    --boja-upozorenje-tekst: #854d0e;
    --boja-upozorenje-pozadina: #fef9c3;
    --boja-upozorenje: #ca8a04;
    --boja-greska-tekst: #9f1239;
    --boja-greska-pozadina: #ffe4e6;
    --boja-greska: #e11d48;
    --boja-info-tekst: #1e40af;
    --boja-info-pozadina: #dbeafe;
    --boja-ljubicasta-tekst: #5b21b6;
    --boja-ljubicasta-pozadina: #ede9fe;

    --header: rgba(255, 255, 255, 0.86);
    --header-text: #0f172a;
    --header-muted: #64748b;

    --radijus-s: 8px;
    --radijus: 12px;
    --radijus-l: 16px;
    --senka-s: 0 1px 2px rgba(15, 23, 42, .05);
    --senka: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 16px rgba(15, 23, 42, .05);
    --senka-l: 0 24px 64px rgba(15, 23, 42, .16);
    --fokus: 0 0 0 3px rgba(15, 118, 110, .28);

    --sidebar: 248px;
    --traka: 60px;
    --brzina: 160ms;

    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.55;
    letter-spacing: -0.008em;
    color: var(--boja-tekst);
    background: var(--boja-pozadina);
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    display: block;
    -webkit-font-smoothing: antialiased;
}

/* Osnova koju je ranije davao devizzo.css (više se ne učitava). */
html {
    width: 100%;
}

body.astracia {
    margin: 0;
}

body.astracia *,
body.astracia *::before,
body.astracia *::after {
    box-sizing: border-box;
}

body.astracia p {
    margin: 0 0 10px;
}

body.astracia ul,
body.astracia ol {
    margin: 0 0 10px;
    padding-left: 20px;
}

body.astracia .sadrzaj.uska {
    max-width: 440px !important;
}

/* Atribut hidden mora da pobedi display iz komponenti (dugme, čip, traka). */
body.astracia [hidden] {
    display: none !important;
}

body.astracia a {
    color: var(--boja-akcent);
    text-decoration: none;
    transition: color var(--brzina);
}

body.astracia a:hover {
    color: var(--boja-akcent-tamna);
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.astracia :focus-visible {
    outline: none;
    box-shadow: var(--fokus);
    border-radius: 6px;
}

body.astracia ::selection {
    background: var(--boja-akcent-svetla);
}

@media (prefers-reduced-motion: reduce) {
    body.astracia *,
    body.astracia *::before,
    body.astracia *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ── Školjka: sidebar + traka + sadržaj ─────────────────────────────────── */

body.astracia .traka-impersonacija {
    position: sticky;
    top: 0;
    z-index: 60;
    background: #fef3c7;
    color: #92400e;
    border-bottom: 1px solid #fde68a;
    font-size: 13px;
    padding: 8px 16px;
}

body.astracia .skolja {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    min-height: 100vh;
}

body.astracia.gost .skolja,
body.astracia.bez-sidebara .skolja {
    grid-template-columns: minmax(0, 1fr);
}

body.astracia .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 12px;
    background: var(--boja-panel);
    border-right: 1px solid var(--boja-ivica);
    overflow-y: auto;
    z-index: 40;
}

body.astracia .sidebar .brend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 14px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.03em;
    color: var(--header-text);
    text-decoration: none;
}

/* Zastor iza sidebara postoji samo na telefonu; na desktopu ne sme da bude grid stavka. */
body.astracia .zastor {
    display: none;
}

body.astracia .brend-mark {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: linear-gradient(135deg, #14b8a6, var(--boja-akcent));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15, 118, 110, .35);
    flex: none;
}

body.astracia .sidebar .grupa-naslov {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--boja-tekst-slabo);
    padding: 12px 10px 4px;
}

body.astracia .meni {
    display: flex;
    flex-direction: column;
    gap: 2px;
    order: 0; /* devizzo.css na telefonu stavlja order:3, što bi meni gurnulo ispod naloga */
    width: auto;
    flex: none;
}

body.astracia .meni a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 550;
    color: var(--boja-tekst-2);
    text-decoration: none;
    border: none;
    transition: background var(--brzina), color var(--brzina);
}

body.astracia .meni a svg {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--boja-tekst-slabo);
    transition: color var(--brzina);
}

body.astracia .meni a:hover {
    background: var(--boja-panel-2);
    color: var(--boja-tekst);
    text-decoration: none;
}

body.astracia .meni a:hover svg {
    color: var(--boja-tekst-2);
}

body.astracia .meni a.aktivna {
    background: var(--boja-akcent-fon);
    color: var(--boja-akcent-tekst);
    border: none;
}

body.astracia .meni a.aktivna svg {
    color: var(--boja-akcent);
}

body.astracia .sidebar .dno {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--boja-ivica);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.astracia .sidebar .nalog {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    margin: 0;
}

body.astracia .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--boja-akcent-svetla);
    color: var(--boja-akcent-tekst);
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    text-transform: uppercase;
}

body.astracia .nalog .ime {
    min-width: 0;
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--boja-tekst);
}

body.astracia .nalog .uloga {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--boja-tekst-tiho);
}

body.astracia .dugme-tekst {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    border-radius: 6px;
    padding: 4px 6px;
    color: var(--header-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

body.astracia .dugme-tekst:hover {
    background: var(--boja-panel-2);
    color: var(--header-text);
    border: none;
}

body.astracia .jezici {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0 4px;
}

body.astracia .jezici a {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 4px 7px;
    border-radius: 6px;
    color: var(--header-muted);
    text-decoration: none;
    transition: background var(--brzina), color var(--brzina);
}

body.astracia .jezici a:hover {
    background: var(--boja-panel-2);
    color: var(--header-text);
}

body.astracia .jezici a.aktivna {
    background: var(--boja-akcent-fon);
    color: var(--boja-akcent);
}

/* Jezik kao globus (16. 9. 2026): sklopljeno u podnožju menija, lista se otvara na klik. */
body.astracia .jezik-izbor { position: relative; padding: 0 4px; }
body.astracia .jezik-izbor > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em;
    color: var(--header-muted);
}
body.astracia .jezik-izbor > summary::-webkit-details-marker { display: none; }
body.astracia .jezik-izbor > summary:hover { background: var(--boja-panel-2); color: var(--header-text); }
body.astracia .jezik-izbor > summary svg { width: 16px; height: 16px; }
body.astracia .jezik-izbor[open] > summary { color: var(--boja-akcent); background: var(--boja-akcent-fon); }
body.astracia .jezik-izbor .jezici {
    position: absolute; left: 4px; bottom: calc(100% + 6px); z-index: 30; min-width: 170px;
    flex-direction: column; gap: 0; padding: 6px; border: 1px solid var(--boja-ivica); border-radius: 10px;
    background: var(--boja-panel); box-shadow: var(--senka-m, 0 8px 24px rgba(0,0,0,.12));
}
body.astracia .jezik-izbor.u-zaglavlju .jezici { bottom: auto; top: calc(100% + 6px); left: auto; right: 0; }
body.astracia .jezik-izbor .jezici a { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; }
body.astracia .jezik-izbor .jezici a small { font-weight: 500; letter-spacing: 0; color: var(--boja-tekst-slabo); }


/* Glavna kolona */
body.astracia .glavno {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.astracia .zaglavlje {
    position: sticky;
    top: 0;
    z-index: 30;
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    background: var(--header);
    border-bottom: 1px solid var(--boja-ivica);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.astracia .zaglavlje-unutra {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--traka);
    padding: 8px 28px;
}

body.astracia .zaglavlje .naslov-strane {
    font-size: 14px;
    font-weight: 650;
    color: var(--boja-tekst);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.astracia .zaglavlje .desno {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.astracia .hamburger {
    display: none;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid var(--boja-ivica);
    background: #fff;
    color: var(--boja-tekst);
    cursor: pointer;
    padding: 0;
}

body.astracia .hamburger svg {
    width: 20px;
    height: 20px;
}

body.astracia .sadrzaj {
    max-width: 1440px !important;
    width: 100%;
    margin: 0 auto;
    padding: 28px 32px 72px;
    flex: 1;
}

body.astracia .podnozje {
    width: 100%;
    padding: 16px 32px;
    background: transparent;
    border-top: 1px solid var(--boja-ivica);
    color: var(--boja-tekst-slabo);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

/* Gost (prijava, registracija, deljeni izveštaj): bez sidebara, centrirano. */
body.astracia.gost {
    background:
        radial-gradient(1000px 520px at 10% -10%, rgba(20, 184, 166, .18), transparent 55%),
        radial-gradient(800px 420px at 100% 0%, rgba(109, 40, 217, .08), transparent 50%),
        var(--boja-pozadina);
}

body.astracia.gost .zaglavlje-unutra {
    justify-content: center;
    gap: 24px;
}

body.astracia.gost .zaglavlje .brend {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.03em;
    color: var(--header-text);
    text-decoration: none;
}

body.astracia.gost .zaglavlje .desno {
    margin-left: 0;
}

body.astracia.gost .sadrzaj {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 132px);
    padding: 40px 20px 72px;
}

body.astracia.gost:has(.deljeni-izvestaj) .sadrzaj {
    display: block;
    min-height: 0;
    max-width: 1200px !important;
    padding: 28px 32px 72px;
}

body.astracia.gost .kartica-auth {
    width: min(440px, 100%);
    margin: 0;
    padding: 36px 34px 30px;
    background: var(--boja-panel);
    border: 1px solid var(--boja-ivica);
    border-radius: 20px;
    box-shadow: var(--senka-l);
}

body.astracia .kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--boja-akcent);
}

body.astracia.gost .kartica-auth h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 6px;
}

body.astracia.gost .kartica-auth form {
    margin-top: 18px;
}

body.astracia .pomocni-linkovi {
    margin-top: 18px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* ── Tipografija ───────────────────────────────────────────────────────── */

body.astracia h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 0 0 6px;
}

body.astracia h2 {
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--boja-tekst);
    margin: 0 0 12px;
}

body.astracia h3 {
    font-size: 13.5px;
    font-weight: 650;
    margin: 16px 0 8px;
}

body.astracia .tiho {
    color: var(--boja-tekst-tiho);
    font-size: 13px;
}

body.astracia .napomena {
    font-size: 12.5px;
    color: var(--boja-tekst-tiho);
    margin: 6px 0 0;
}

body.astracia code,
body.astracia .kod {
    font-family: var(--mono);
    font-size: 12px;
}

body.astracia code {
    background: var(--boja-panel-2);
    border: 1px solid var(--boja-ivica);
    border-radius: 5px;
    padding: 1px 5px;
}

body.astracia pre.kod {
    background: var(--boja-panel-2);
    border: 1px solid var(--boja-ivica);
    border-radius: var(--radijus-s);
    padding: 12px 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

body.astracia .glava-stranice {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

body.astracia .glava-stranice > div:first-child {
    min-width: 0;
}

body.astracia .glava-stranice .akcije {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

body.astracia .mrvice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--boja-tekst-tiho);
    margin-bottom: 8px;
}

body.astracia .mrvice a {
    color: var(--boja-tekst-tiho);
}

body.astracia .mrvice a:hover {
    color: var(--boja-akcent);
}

body.astracia .mrvice .sep {
    color: var(--boja-tekst-slabo);
}

body.astracia .ideja-red {
    color: var(--boja-tekst-tiho);
    font-size: 13.5px;
    max-width: 88ch;
    margin: 0;
}

/* ── Responsive školjka ─────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    body.astracia {
        --sidebar: 220px;
    }
    body.astracia .sadrzaj {
        padding: 22px 22px 64px;
    }
}

@media (max-width: 860px) {
    body.astracia .skolja {
        grid-template-columns: minmax(0, 1fr);
    }
    body.astracia .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(300px, 86vw);
        transform: translateX(-104%);
        transition: transform 220ms ease;
        box-shadow: var(--senka-l);
    }
    body.astracia.sidebar-otvoren .sidebar {
        transform: none;
    }
    body.astracia .zastor {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .4);
        z-index: 39;
        opacity: 0;
        pointer-events: none;
        transition: opacity 200ms;
    }
    body.astracia.sidebar-otvoren .zastor {
        opacity: 1;
        pointer-events: auto;
    }
    body.astracia .hamburger {
        display: inline-flex;
    }
    body.astracia .zaglavlje-unutra {
        padding: 8px 16px;
    }
    body.astracia .sadrzaj,
    body.astracia .podnozje {
        padding-left: 16px;
        padding-right: 16px;
    }
    body.astracia .glava-stranice {
        flex-direction: column;
        gap: 12px;
    }
    body.astracia h1 {
        font-size: 22px;
    }
}
