* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #eef2f6;
    margin: 0;
    padding: 0;
    color: #111827;
    font-size: 16px;
    line-height: 1.45;
}

/* GLAVNI OKVIR */

.container {
    width: calc(100% - 40px);
    max-width: 1280px;
    margin: 28px auto;
    background: #ffffff;
    padding: 26px;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.10);
}

.dashboard-container {
    max-width: 980px;
    margin-top: 42px;
}

.login-box {
    max-width: 440px;
    margin: 70px auto;
}

/* NASLOVI */

h1 {
    margin: 0 0 18px 0;
    font-size: 32px;
    line-height: 1.18;
    color: #0f172a;
    letter-spacing: -0.4px;
}

h2 {
    margin: 22px 0 12px 0;
    font-size: 22px;
    line-height: 1.25;
    color: #0f172a;
}

p {
    margin: 8px 0 14px 0;
}

/* MODULI NA POČETNOJ */

.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.module-card {
    text-align: center;
    padding: 22px 18px;
}

.module-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #d7e6da;
}

.logout-wrap {
    text-align: center;
    margin-top: 22px;
}

/* NAVIGACIJA I GUMBI */

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px 0;
}

.nav a,
.button,
button {
    display: inline-block;
    width: auto;
    padding: 11px 17px;
    background: #eaf2ec;
    color: #1f2937;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #d7e6da;
    cursor: pointer;
    font-size: 17px;
    line-height: 1.2;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(31, 41, 55, 0.10);
}

.nav a:hover,
.button:hover,
button:hover {
    background: #dce9df;
}

.nav a:active,
.button:active,
button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(31, 41, 55, 0.12);
}

.secondary-button {
    background: #eaf2ec;
    color: #1f2937;
    border: 1px solid #d7e6da;
}

.secondary-button:hover {
    background: #dce9df;
}

.danger {
    color: #b91c1c !important;
    font-weight: bold;
}

/* OBRASCI */

form {
    margin-top: 10px;
}

form label,
label,
.app-static-label {
    display: block;
    margin-top: 14px;
    margin-bottom: 5px;
    font-weight: 700;
    color: #1f2937;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    margin-top: 3px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #111827;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #9bbda3;
    box-shadow: 0 0 0 3px rgba(155, 189, 163, 0.22);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 12px;
    margin-top: 16px;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

/* KARTICE SA ZBROJEVIMA */

.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin: 18px 0 24px 0;
}

.card {
    background: #f8fafc;
    padding: 16px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.card h2 {
    margin-top: 0;
}

.card strong {
    display: inline-block;
    margin-top: 5px;
    font-size: 20px;
    color: #0f172a;
}

/* TABLICE */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 18px;
    font-size: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

th,
td {
    border-bottom: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fafc;
}

td a {
    color: #2f5d3a;
    font-weight: 700;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

/* IZNOSI */

.negative {
    color: #b91c1c;
    font-weight: 700;
}

.positive {
    color: #166534;
    font-weight: 700;
}

/* MOBITEL */

@media (max-width: 700px) {

    body {
        font-size: 18px;
        line-height: 1.5;
        background: #eef2f6;
    }

    .container {
        width: auto;
        max-width: none;
        margin: 8px;
        padding: 18px;
        border-radius: 18px;
        box-shadow: none;
    }

    .dashboard-container {
        margin-top: 12px;
    }

    .login-box {
        max-width: none;
        margin: 22px 8px;
    }

    h1 {
        font-size: 30px;
        line-height: 1.18;
        margin-bottom: 18px;
    }

    h2 {
        font-size: 23px;
        line-height: 1.25;
        margin-top: 20px;
    }

    .module-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .module-card {
        padding: 20px 16px;
    }

    .module-title {
        font-size: 25px;
    }

    .nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 22px;
    }

    .nav a,
    .button,
    button {
        display: inline-block;
        width: auto;
        text-align: center;
        font-size: 17px;
        padding: 11px 17px;
        border-radius: 10px;
    }

    .logout-wrap .button {
        width: auto;
    }

    input,
    select,
    textarea {
        font-size: 18px;
        padding: 14px;
        border-radius: 13px;
    }

    form label,
    label,
    .app-static-label {
        font-size: 17px;
        margin-top: 16px;
    }

    .summary {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 16px 0 22px 0;
    }

    .card {
        width: 100%;
        padding: 18px;
        border-radius: 16px;
        font-size: 18px;
    }

    .card strong {
        font-size: 22px;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        font-size: 16px;
        white-space: nowrap;
        border-radius: 14px;
    }

    th,
    td {
        padding: 12px;
    }
}

/* VRLO USKI MOBITELI */

@media (max-width: 390px) {

    body {
        font-size: 17px;
    }

    .container {
        margin: 6px;
        padding: 15px;
    }

    h1 {
        font-size: 27px;
    }

    h2 {
        font-size: 21px;
    }

    .module-title {
        font-size: 23px;
    }

    .nav a,
    .button,
    button {
        display: inline-block;
        width: auto;
        font-size: 17px;
        padding: 11px 17px;
        border-radius: 10px;
    }

    input,
    select,
    textarea {
        font-size: 17px;
        padding: 13px;
    }

    .card {
        font-size: 17px;
        padding: 16px;
    }

    .card strong {
        font-size: 21px;
    }

    table {
        font-size: 15px;
    }
}
.module-button {
    min-width: 96px;
    text-align: center;
}
/* Shared application message contract. */
.app-message {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 700;
}
.app-message-success { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.app-message-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.app-message-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.app-message-info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
