@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@600;700;800&display=swap');

/* =====================================================
   PROBUDI HEROJA! — e-Pisarnica
   ===================================================== */

* {
    box-sizing: border-box;
}

:root {
    --red: #E80000;
    --dark-red: #B80000;
    --blue: #1568B3;
    --dark-blue: #0C3B66;
    --deep-blue: #0A2C4D;
    --yellow: #FFD54D;
    --background: #F2F7FB;
    --text: #1B2B3A;
    --muted: #5A6B7C;
    --border: #E1E9F2;
    --white: #FFFFFF;
    --shadow: 0 8px 28px rgba(10, 44, 77, 0.08);
}

/* OSNOVNO */

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: "Inter", Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.6;
}

/* NASLOVI */

h1,
h2,
h3,
h4,
.metric {
    font-family: "Sora", Arial, sans-serif;
    color: var(--deep-blue);
}

h1 {
    margin-top: 0;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
}

h2 {
    font-size: 27px;
    font-weight: 800;
}

h3 {
    font-size: 17px;
    font-weight: 700;
}

/* =====================================================
   HEADER
   ===================================================== */

header {
    min-height: 82px;
    padding: 14px 5%;
    background: var(--white);
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    box-shadow: 0 3px 18px rgba(10, 44, 77, 0.06);
}

/* LOGO + NAZIV APLIKACIJE */

.brand {
    display: flex;
    align-items: center;
    gap: 14px;

    text-decoration: none;
    flex-shrink: 0;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    display: block;
    width: auto;
    height: 50px;
    max-width: 190px;
    object-fit: contain;
}

.brand-divider {
    display: block;
    width: 1px;
    height: 34px;
    background: var(--border);
}

.brand-app {
    font-family: "Sora", Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--deep-blue);
    white-space: nowrap;
}

/* =====================================================
   NAVIGACIJA
   ===================================================== */

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

nav a {
    padding: 10px 12px;

    color: var(--deep-blue);
    text-decoration: none;

    font-size: 14px;
    font-weight: 700;

    border-radius: 8px;

    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--red);
    background: #FFF3F3;
}

/* ODJAVA */

.logout-link {
    margin-left: 8px;
    color: var(--red) !important;
}

.logout-link:hover {
    color: var(--white) !important;
    background: var(--red) !important;
}

/* =====================================================
   GLAVNI SADRŽAJ
   ===================================================== */

main {
    width: 100%;
    max-width: 1200px;

    margin: 34px auto;
    padding: 0 22px;
}

/* =====================================================
   KARTICE
   ===================================================== */

.card {
    padding: 22px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 16px;

    box-shadow: var(--shadow);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

/* DASHBOARD BROJKE */

.metric {
    margin-bottom: 8px;

    color: var(--deep-blue);

    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

/* CRVENI BRAND DETALJ */

.grid .card {
    position: relative;
    overflow: hidden;
}

.grid .card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background: var(--red);
}

/* =====================================================
   TABLICE
   ===================================================== */

table {
    width: 100%;

    border-collapse: separate;
    border-spacing: 0;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 14px;

    overflow: hidden;

    box-shadow: 0 6px 22px rgba(10, 44, 77, 0.05);
}

th {
    padding: 13px 14px;

    background: var(--deep-blue);
    color: var(--white);

    text-align: left;

    font-family: "Inter", Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
}

td {
    padding: 13px 14px;

    border-bottom: 1px solid var(--border);

    vertical-align: middle;
}

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

tbody tr:hover {
    background: #F7FAFD;
}

/* =====================================================
   LINKOVI
   ===================================================== */

a {
    color: var(--blue);
}

main a:hover {
    color: var(--red);
}

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

label {
    display: block;

    margin-bottom: 6px;

    color: var(--deep-blue);

    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;

    padding: 11px 12px;

    background: var(--white);
    color: var(--text);

    border: 1px solid #CBD9E6;
    border-radius: 9px;

    font-family: "Inter", Arial, sans-serif;
    font-size: 15px;

    transition: all 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;

    border-color: var(--blue);

    box-shadow: 0 0 0 3px rgba(21, 104, 179, 0.12);
}

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

/* =====================================================
   GUMBI
   ===================================================== */

button,
.btn {
    display: inline-block;

    padding: 11px 18px;

    border: 0;
    border-radius: 10px;

    background: linear-gradient(
        135deg,
        var(--red),
        var(--dark-red)
    );

    color: var(--white);

    font-family: "Sora", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    box-shadow: 0 6px 16px rgba(232, 0, 0, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

button:hover,
.btn:hover {
    color: var(--white);

    transform: translateY(-1px);

    box-shadow: 0 8px 20px rgba(232, 0, 0, 0.24);
}

/* =====================================================
   POMOĆNI TEKST
   ===================================================== */

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

/* =====================================================
   PORUKE
   ===================================================== */

.error {
    padding: 12px 14px;

    background: #FFF0F0;
    color: #9F0000;

    border-left: 4px solid var(--red);
    border-radius: 8px;
}

.ok {
    padding: 12px 14px;

    background: #EAF7EF;
    color: #176A38;

    border-left: 4px solid #249454;
    border-radius: 8px;
}

/* =====================================================
   LINIJE
   ===================================================== */

hr {
    margin: 24px 0;

    border: 0;
    border-top: 1px solid var(--border);
}

/* =====================================================
   FORME U KARTICI
   ===================================================== */

.card form button {
    margin-top: 5px;
}

/* =====================================================
   MOBITEL / TABLET
   ===================================================== */

@media (max-width: 800px) {

    header {
        padding: 14px 18px;

        flex-direction: column;
        align-items: flex-start;

        gap: 12px;
    }

    .brand img {
        height: 43px;
        max-width: 165px;
    }

    .brand-app {
        font-size: 16px;
    }

    .brand-divider {
        height: 28px;
    }

    nav {
        width: 100%;
    }

    nav a {
        padding: 8px 9px;
        font-size: 13px;
    }

    .logout-link {
        margin-left: 0;
    }

    main {
        margin-top: 22px;
        padding: 0 14px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 23px;
    }

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

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .card {
        padding: 18px;
    }
}
/* FINALNO PODEŠAVANJE HEADERA */

header {
    min-height: 76px;
    padding: 10px 5%;
}

.brand {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
}

.brand img {
    width: 170px;
    height: 58px;
    max-width: 170px;
    object-fit: contain;
}

.brand-divider {
    width: 1px;
    height: 34px;
    flex-shrink: 0;
    background: #E1E9F2;
}

.brand-app {
    display: block;
    margin: 0;
    white-space: nowrap;
    font-family: "Sora", Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #0A2C4D;
}

nav {
    margin-left: auto;
    flex-wrap: nowrap;
}
/* =====================================================
   PADAJUĆI IZBORNIK — PREDMETI / AKTI
   ===================================================== */

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.nav-dropdown-menu {
    display: none;

    position: absolute;
    top: calc(100% + 4px);
    left: 0;

    min-width: 190px;
    padding: 7px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 12px;

    box-shadow: 0 12px 30px rgba(10, 44, 77, 0.15);

    z-index: 1000;
}

.nav-dropdown-menu a {
    display: block;

    width: 100%;
    padding: 10px 12px;

    border-radius: 8px;

    white-space: nowrap;

    color: var(--deep-blue);
    background: transparent;
}

.nav-dropdown-menu a:hover {
    color: var(--red);
    background: #FFF3F3;
}

/* OTVARANJE MIŠEM */

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

/* OTVARANJE TIPKOVNICOM / DODIROM */

.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.nav-arrow {
    font-size: 11px;
    line-height: 1;
}


/* MOBITEL / TABLET */

@media (max-width: 800px) {

    nav {
        flex-wrap: wrap;
    }

    .nav-dropdown-menu {
        top: 100%;
        min-width: 180px;
    }
}
/* =====================================================
   MOJE — PREDMETI I AKTI
   ===================================================== */

.my-work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    margin-top: 24px;
}

.my-work-grid h2 {
    margin-top: 0;
}

@media (max-width: 900px) {

    .my-work-grid {
        grid-template-columns: 1fr;
    }
}