/* =========================================
   PONUDAPRO V1.0
   ========================================= */

* {
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;

    --sidebar: #0f172a;
    --sidebar-light: #1e293b;

    --background: #f4f7fb;
    --card: #ffffff;

    --text: #172033;
    --muted: #64748b;

    --border: #e2e8f0;
    --danger: #dc2626;

    --radius: 16px;
    --radius-large: 24px;

    --shadow:
        0 12px 35px rgba(15, 23, 42, 0.07);

    --shadow-large:
        0 20px 60px rgba(15, 23, 42, 0.10);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: var(--background);
    color: var(--text);

    min-height: 100vh;
}


/* =========================================
   SIDEBAR
   ========================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 260px;
    height: 100vh;

    padding: 28px 18px;

    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, 0.32),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            #111c34 0%,
            #0f172a 55%,
            #0b1120 100%
        );

    color: white;

    z-index: 100;

    box-shadow:
        12px 0 35px rgba(15, 23, 42, 0.08);
}


/* LOGO */

.logo {
    margin: 0 10px 30px;

    font-size: 27px;
    font-weight: 800;

    letter-spacing: -1px;
}

.logo::after {
    content: ".";

    color: #60a5fa;
}


/* JEZIK */

.language-box {
    display: flex;
    align-items: center;

    gap: 8px;

    margin: 0 6px 30px;

    padding: 7px 9px;

    background: rgba(255, 255, 255, 0.07);

    border: 1px solid rgba(255, 255, 255, 0.08);

    border-radius: 12px;
}

.language-box span {
    font-size: 15px;
}

.language-box select {
    width: 100%;

    padding: 8px 5px;

    border: 0;
    outline: none;

    background: transparent;
    color: white;

    font-size: 13px;

    cursor: pointer;
}

.language-box select option {
    color: #172033;
    background: white;
}


/* NAVIGACIJA */

.menu-item {
    display: flex;
    align-items: center;

    gap: 13px;

    margin-bottom: 8px;

    padding: 14px 15px;

    border-radius: 12px;

    color: #cbd5e1;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);

    color: white;

    transform: translateX(3px);
}

.menu-item.active {
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color: white;

    box-shadow:
        0 8px 22px rgba(37, 99, 235, 0.30);
}


/* =========================================
   GLAVNI SADRŽAJ
   ========================================= */

.content {
    margin-left: 260px;

    min-height: 100vh;

    padding:
        58px
        clamp(30px, 5vw, 85px)
        80px;
}

.page {
    display: none;

    animation: pageFade 0.25s ease;
}

.page.active-page {
    display: block;
}

@keyframes pageFade {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   HERO
   ========================================= */

.hero {
    max-width: 850px;
}

.small-title {
    display: inline-block;

    margin: 0 0 12px;

    color: var(--primary);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.8px;
}

.hero h1 {
    max-width: 780px;

    margin: 0 0 18px;

    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.04;

    letter-spacing: -2px;
}

.description {
    max-width: 720px;

    margin: 0 0 10px;

    color: var(--muted);

    font-size: 17px;
    line-height: 1.7;
}


/* =========================================
   GLAVNA KARTICA
   ========================================= */

.calculator-card {
    width: 100%;
    max-width: 1050px;

    margin-top: 38px;

    padding: 34px;

    background: var(--card);

    border: 1px solid rgba(226, 232, 240, 0.85);

    border-radius: var(--radius-large);

    box-shadow: var(--shadow);
}


/* =========================================
   SEKCIJE FORME
   ========================================= */

.form-section {
    padding: 8px 0 34px;

    margin-bottom: 30px;

    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 25px;

    margin-bottom: 22px;
}

.section-heading > div {
    display: flex;
    align-items: center;

    gap: 12px;
}

.section-heading h3 {
    margin: 0;

    font-size: 20px;
    letter-spacing: -0.3px;
}

.section-heading p {
    max-width: 420px;

    margin: 2px 0 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.5;

    text-align: right;
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 38px;

    padding: 0 9px;

    background: var(--primary-light);

    color: var(--primary);

    border-radius: 10px;

    font-size: 12px;
    font-weight: 800;
}


/* =========================================
   LABEL / INPUT / SELECT / TEXTAREA
   ========================================= */

label {
    display: block;

    margin: 0 0 8px;

    color: #334155;

    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;

    padding: 13px 14px;

    border: 1px solid var(--border);

    border-radius: 11px;

    outline: none;

    background: #ffffff;

    color: var(--text);

    font-family: inherit;
    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #a0aec0;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #cbd5e1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.10);
}

textarea {
    resize: vertical;

    min-height: 105px;
}


/* =========================================
   GRIDOVI
   ========================================= */

.client-grid,
.offer-info-grid,
.offer-extra-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.offer-note {
    margin-top: 22px;
}


/* =========================================
   STRUKA
   ========================================= */

#trade {
    max-width: 460px;

    padding: 14px;

    font-weight: 650;

    background: #fbfdff;
}


/* =========================================
   BRZI RADOVI
   ========================================= */

.quick-work-box {
    margin-top: 24px;

    padding: 22px;

    background:
        linear-gradient(
            135deg,
            #f8fbff,
            #f4f7fc
        );

    border: 1px solid #e4eaf2;

    border-radius: 18px;
}

.quick-work-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 16px;
}

.quick-label {
    display: block;

    margin-bottom: 4px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.quick-work-header h4 {
    margin: 0;

    font-size: 17px;
}

.quick-help {
    color: var(--muted);

    font-size: 12px;
}

.quick-works {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;
}

.quick-work-button {
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 82px;

    padding: 13px;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    background: white;

    color: var(--text);

    text-align: left;

    cursor: pointer;

    box-shadow:
        0 2px 7px rgba(15, 23, 42, 0.025);

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.quick-work-button:hover {
    transform: translateY(-2px);

    border-color: #93c5fd;

    background: #fbfdff;

    box-shadow:
        0 8px 18px rgba(37, 99, 235, 0.09);
}

.quick-work-button span {
    font-size: 13px;
    font-weight: 700;

    line-height: 1.35;
}

.quick-work-button small {
    margin-top: 10px;

    color: var(--primary);

    font-size: 11px;
    font-weight: 800;
}

.no-quick-works {
    grid-column: 1 / -1;

    margin: 0;

    padding: 18px;

    color: var(--muted);

    background: white;

    border-radius: 12px;

    font-size: 13px;
}


/* =========================================
   STAVKE PONUDE
   ========================================= */

.items-header {
    display: grid;

    grid-template-columns:
        minmax(180px, 2.2fr)
        minmax(90px, 0.8fr)
        minmax(90px, 0.8fr)
        minmax(110px, 0.9fr)
        minmax(100px, 0.9fr)
        42px;

    gap: 10px;

    padding: 0 12px 9px;

    color: #94a3b8;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.6px;

    text-transform: uppercase;
}

.offer-item {
    display: grid;

    grid-template-columns:
        minmax(180px, 2.2fr)
        minmax(90px, 0.8fr)
        minmax(90px, 0.8fr)
        minmax(110px, 0.9fr)
        minmax(100px, 0.9fr)
        42px;

    gap: 10px;

    align-items: center;

    margin-bottom: 10px;

    padding: 11px;

    background: #f8fafc;

    border: 1px solid #edf1f5;

    border-radius: 13px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.offer-item:focus-within {
    border-color: #bfdbfe;

    background: #fbfdff;
}

.offer-item input,
.offer-item select {
    margin: 0;

    padding: 11px 10px;

    background: white;

    font-size: 13px;
}

.item-total {
    padding-right: 3px;

    color: var(--primary-dark);

    font-size: 13px;
    font-weight: 800;

    text-align: right;

    white-space: nowrap;
}

.delete-item {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;

    border-radius: 10px;

    background: #ffffff;

    color: #94a3b8;

    font-size: 20px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.delete-item:hover {
    background: #fee2e2;

    color: var(--danger);

    transform: scale(1.04);
}


/* =========================================
   DODAJ STAVKU
   ========================================= */

.add-item-button {
    margin-top: 8px;

    padding: 11px 16px;

    border: 1px solid #bfdbfe;

    border-radius: 10px;

    background: var(--primary-light);

    color: var(--primary-dark);

    font-family: inherit;
    font-size: 13px;
    font-weight: 750;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.add-item-button:hover {
    transform: translateY(-1px);

    background: #dbeafe;

    border-color: #93c5fd;
}


/* =========================================
   UKUPNO
   ========================================= */

.offer-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    margin-top: 8px;

    padding: 24px 26px;

    background:
        linear-gradient(
            135deg,
            #eff6ff 0%,
            #f8fbff 100%
        );

    border: 1px solid #dbeafe;

    border-radius: 18px;
}

.summary-label {
    display: block;

    margin-bottom: 5px;

    color: var(--primary);

    font-size: 10px;
    font-weight: 850;

    letter-spacing: 1.1px;
}

.offer-summary p {
    margin: 0;

    color: var(--muted);

    font-size: 12px;
}

.offer-summary strong {
    color: var(--primary-dark);

    font-size: 31px;
    letter-spacing: -1px;

    white-space: nowrap;
}


/* =========================================
   GLAVNI GUMB
   ========================================= */

.generate-button {
    width: 100%;

    margin-top: 18px;

    padding: 15px 20px;

    border: 0;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );

    color: white;

    font-family: inherit;
    font-size: 15px;
    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.generate-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(37, 99, 235, 0.28);

    filter: brightness(1.02);
}

.generate-button:active {
    transform: translateY(0);
}


/* =========================================
   POČETNA
   ========================================= */

#home .hero {
    max-width: 900px;
}

#home .hero h1 {
    max-width: 820px;

    margin-top: 6px;
}

#home .generate-button {
    width: auto;

    min-width: 210px;

    margin-top: 24px;

    padding-left: 24px;
    padding-right: 24px;
}


/* PODRŠKA ZA STARIJI HOME LAYOUT */

.home-layout {
    display: grid;

    grid-template-columns: 1.1fr 0.9fr;

    gap: 50px;

    align-items: center;
}

.home-actions {
    display: flex;

    gap: 12px;

    flex-wrap: wrap;

    margin-top: 25px;
}

.secondary-button {
    padding: 14px 22px;

    border: 1px solid var(--border);

    border-radius: 11px;

    background: white;

    color: var(--text);

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.secondary-button:hover {
    background: #f8fafc;
}

.home-features {
    display: flex;

    flex-wrap: wrap;

    gap: 12px 20px;

    margin-top: 25px;
}

.feature-item {
    color: #475569;

    font-size: 13px;
    font-weight: 650;
}


/* =========================================
   PREVIEW PONUDE
   ========================================= */

.home-preview {
    display: flex;
    justify-content: center;
}

.preview-card {
    width: 100%;
    max-width: 430px;

    padding: 25px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 20px;

    box-shadow: var(--shadow-large);
}

.preview-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 25px;
}

.preview-label {
    margin-bottom: 6px;

    color: var(--muted);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.2px;
}

.preview-top h3 {
    margin: 0;

    font-size: 22px;
}

.preview-status {
    padding: 7px 10px;

    background: #dcfce7;

    color: #15803d;

    border-radius: 20px;

    font-size: 11px;
    font-weight: 750;
}

.preview-client {
    display: flex;
    justify-content: space-between;

    padding: 14px 0;

    margin-bottom: 10px;

    border-top: 1px solid #edf0f3;
    border-bottom: 1px solid #edf0f3;
}

.preview-client span,
.preview-line span {
    color: var(--muted);
}

.preview-line {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid #edf0f3;
}

.preview-line div {
    display: flex;
    flex-direction: column;

    gap: 4px;
}

.preview-line span {
    font-size: 12px;
}

.preview-total {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-top: 20px;

    font-size: 17px;
}

.preview-total strong {
    font-size: 24px;
}


/* =========================================
   MOJE PONUDE
   ========================================= */

.saved-offer-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 12px;

    padding: 18px 20px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 14px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.saved-offer-card:hover {
    transform: translateY(-1px);

    border-color: #cbd5e1;

    box-shadow:
        0 7px 20px rgba(15, 23, 42, 0.05);
}

.saved-offer-info strong {
    font-size: 15px;
}

.saved-offer-info p {
    margin: 5px 0;

    color: #475569;

    font-size: 14px;
}

.saved-offer-info small {
    color: #94a3b8;
}

.saved-offer-right {
    display: flex;
    align-items: center;

    gap: 20px;
}

.saved-offer-total {
    color: var(--text);

    font-size: 16px;

    white-space: nowrap;
}

.saved-offer-actions {
    display: flex;

    gap: 7px;
}

.offer-pdf-button,
.offer-delete-button {
    padding: 9px 13px;

    border: 0;

    border-radius: 9px;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.offer-pdf-button {
    background: var(--primary-light);

    color: var(--primary-dark);
}

.offer-pdf-button:hover {
    background: #dbeafe;
}

.offer-delete-button {
    background: #fff1f2;

    color: #be123c;
}

.offer-delete-button:hover {
    background: #ffe4e6;
}


/* =========================================
   PROFIL
   ========================================= */

#profile .calculator-card {
    max-width: 720px;
}

#profile .calculator-card label:not(:first-child) {
    margin-top: 18px;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 1100px) {

    .content {
        padding: 48px 38px 70px;
    }

    .quick-works {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .items-header {
        display: none;
    }

    .offer-item {
        grid-template-columns:
            2fr 1fr 1fr;
    }

    .item-total {
        text-align: left;
    }

    .delete-item {
        width: 100%;
    }
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 760px) {

    body {
        padding-bottom: 82px;
    }


    /* Sidebar postaje donji meni */

    .sidebar {
        position: fixed;

        top: auto;
        bottom: 0;
        left: 0;

        display: grid;

        grid-template-columns:
            repeat(4, 1fr);

        width: 100%;
        height: 72px;

        padding: 7px 8px;

        background: rgba(15, 23, 42, 0.97);

        backdrop-filter: blur(14px);

        box-shadow:
            0 -8px 30px rgba(15, 23, 42, 0.15);
    }

    .logo,
    .language-box {
        display: none;
    }

    .menu-item {
        flex-direction: column;
        justify-content: center;

        gap: 3px;

        min-width: 0;

        margin: 0;

        padding: 7px 3px;

        border-radius: 10px;

        font-size: 18px;
    }

    .menu-item span {
        max-width: 100%;

        overflow: hidden;

        color: #cbd5e1;

        font-size: 10px;

        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .menu-item:hover {
        transform: none;
    }

    .menu-item.active {
        background: rgba(37, 99, 235, 0.22);

        box-shadow: none;
    }

    .menu-item.active span {
        color: white;
    }


    /* Content */

    .content {
        margin-left: 0;

        padding:
            28px
            16px
            35px;
    }

    .hero h1 {
        margin-bottom: 14px;

        font-size: 36px;
        line-height: 1.08;

        letter-spacing: -1.4px;
    }

    .description {
        font-size: 15px;
        line-height: 1.6;
    }


    /* Kartica */

    .calculator-card {
        margin-top: 27px;

        padding: 20px 16px;

        border-radius: 18px;
    }


    /* Sekcije */

    .form-section {
        padding-bottom: 27px;

        margin-bottom: 25px;
    }

    .section-heading {
        display: block;

        margin-bottom: 18px;
    }

    .section-heading > div {
        margin-bottom: 7px;
    }

    .section-heading h3 {
        font-size: 18px;
    }

    .section-heading p {
        max-width: none;

        padding-left: 50px;

        font-size: 12px;

        text-align: left;
    }


    /* Forme */

    .client-grid,
    .offer-info-grid,
    .offer-extra-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    #trade {
        max-width: none;
    }


    /* Brzi radovi */

    .quick-work-box {
        margin-top: 20px;

        padding: 15px;

        border-radius: 15px;
    }

    .quick-work-header {
        align-items: flex-start;

        margin-bottom: 13px;
    }

    .quick-help {
        display: none;
    }

    .quick-works {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }

    .quick-work-button {
        min-height: 78px;

        padding: 11px;
    }


    /* Stavke */

    .offer-item {
        position: relative;

        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 9px;

        padding: 12px;
    }

    .offer-item .item-name {
        grid-column: 1 / -1;
    }

    .offer-item .item-price {
        grid-column: 1 / 2;
    }

    .item-total {
        display: flex;
        align-items: center;
        justify-content: flex-end;

        min-height: 44px;

        padding: 0 8px;

        background: #eff6ff;

        border-radius: 9px;

        font-size: 14px;
    }

    .delete-item {
        grid-column: 1 / -1;

        width: 100%;
        height: 38px;

        background: #fff1f2;

        color: #be123c;

        font-size: 18px;
    }


    /* Ukupno */

    .offer-summary {
        display: block;

        padding: 20px;

        border-radius: 15px;
    }

    .offer-summary strong {
        display: block;

        margin-top: 13px;

        font-size: 30px;
    }


    /* Saved offers */

    .saved-offer-card {
        align-items: flex-start;

        padding: 15px;
    }

    .saved-offer-right {
        flex-direction: column;
        align-items: flex-end;

        gap: 9px;
    }

    .saved-offer-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }


    /* Home */

    #home .generate-button {
        width: 100%;
    }

    .home-layout {
        grid-template-columns: 1fr;
    }

    .home-preview {
        justify-content: flex-start;
    }

}


/* =========================================
   MALI MOBITELI
   ========================================= */

@media (max-width: 390px) {

    .content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .calculator-card {
        padding-left: 12px;
        padding-right: 12px;
    }

    .quick-works {
        grid-template-columns: 1fr 1fr;
    }

    .menu-item span {
        font-size: 9px;
    }
}/* =========================================
   FINANCIJSKI SAŽETAK
   ========================================= */

.price-breakdown {
    margin-top: 10px;
    margin-bottom: 14px;

    padding: 18px 22px;

    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 15px;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 8px 0;

    color: var(--muted);

    font-size: 13px;
}

.price-row + .price-row {
    border-top: 1px solid #edf1f5;
}

.price-row strong {
    color: var(--text);

    font-size: 14px;

    white-space: nowrap;
}

@media (max-width: 760px) {

    .price-breakdown {
        padding: 15px;
    }

    .price-row {
        font-size: 12px;
    }
}
