* {
    box-sizing: border-box;
}

:root {
    --navy: #10273a;
    --navy-light: #17364f;
    --blue: #2d6f91;
    --blue-light: #eaf4f8;
    --gold: #d9a441;
    --green: #2f8f68;
    --background: #f4f7f9;
    --card: #ffffff;
    --text: #183042;
    --muted: #71818d;
    --border: #dce5ea;
    --danger: #b74a4a;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

/* GORNJA TRAKA */

.topbar {
    min-height: 92px;
    background: var(--navy);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 42px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.topbar h1 {
    margin: 0;
    font-size: 27px;
    letter-spacing: 0.4px;
}

.topbar h1 span {
    color: #72b8d2;
}

.topbar p {
    margin: 5px 0 0;
    color: #b8c8d2;
    font-size: 13px;
}

.datum {
    text-align: right;
}

.datum span {
    display: block;
    color: #9fb2bf;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.2px;
    margin-bottom: 5px;
}

.datum strong {
    font-size: 17px;
}


/* GLAVNI SADRŽAJ */

main {
    width: min(1500px, calc(100% - 48px));
    margin: 28px auto 50px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(20, 45, 62, 0.05);
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.section-title.compact {
    margin-bottom: 14px;
}

.section-title h2 {
    margin: 0;
    font-size: 19px;
}

.section-title p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}


/* DUGMAD */

button {
    font-family: inherit;
    cursor: pointer;
}

.secondary-button {
    background: white;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
}

.secondary-button:hover {
    background: #f5f8fa;
}

.primary-button {
    height: 45px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: white;
    padding: 0 22px;
    font-size: 14px;
    font-weight: bold;
}

.primary-button:hover {
    background: #255e7b;
}


/* EKIPA */

.team-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 12px;
}

.person {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: #fbfcfd;
}

.person > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.person strong {
    font-size: 15px;
}

.role {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    padding: 4px 7px;
    border-radius: 5px;
}

.role.sanker {
    color: #855f13;
    background: #fff3d8;
}

.role.konobar {
    color: #25654d;
    background: #e1f4ec;
}

.shift {
    display: flex;
    gap: 8px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 13px;
}


/* INTERVALI */

.daily-total {
    text-align: right;
}

.daily-total span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.8px;
}

.daily-total strong {
    display: block;
    font-size: 22px;
    margin-top: 4px;
}

.intervals {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 7px;
}

.intervals button {
    border: 1px solid var(--border);
    background: #f8fafb;
    color: var(--text);
    min-height: 42px;
    border-radius: 7px;
    font-weight: bold;
}

.intervals button:hover {
    background: var(--blue-light);
}

.intervals button.active {
    color: white;
    background: var(--blue);
    border-color: var(--blue);
}


/* RADNI DIO */

.work-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
}

.work-grid > .card {
    margin-bottom: 20px;
}

.interval-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.interval-header > div:first-child span {
    font-size: 10px;
    color: var(--muted);
    font-weight: bold;
    letter-spacing: 1px;
}

.interval-header h2 {
    margin: 5px 0 0;
    font-size: 23px;
}

.interval-total {
    text-align: right;
}

.interval-total span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.interval-total strong {
    display: block;
    margin-top: 4px;
    font-size: 24px;
}


/* RASPODJELA */

.distribution {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.distribution-title {
    font-size: 12px;
    color: var(--muted);
    font-weight: bold;
    margin-bottom: 10px;
}

.distribution-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.distribution-grid > div {
    min-width: 105px;
    background: var(--blue-light);
    border-radius: 8px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.distribution-grid span {
    font-size: 12px;
}

.distribution-grid strong {
    color: var(--blue);
    font-size: 14px;
}


/* UNOS BAKŠIŠA */

.tip-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    padding-top: 20px;
}

.input-group label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: bold;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.input-group input {
    width: 100%;
    height: 45px;
    border: 1px solid #cbd7de;
    border-radius: 8px;
    padding: 0 12px;
    outline: none;
    font-size: 16px;
    color: var(--text);
    background: white;
}

.input-group input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(45, 111, 145, 0.1);
}

.money-input {
    position: relative;
}

.money-input input {
    padding-right: 38px;
}

.money-input span {
    position: absolute;
    right: 13px;
    top: 12px;
    color: var(--muted);
    font-weight: bold;
}


/* LISTA STOLOVA */

.tip-list {
    min-height: 178px;
}

.tip-row {
    display: grid;
    grid-template-columns: 1fr auto 30px;
    align-items: center;
    gap: 12px;
    min-height: 51px;
    border-bottom: 1px solid #edf1f3;
}

.tip-row span {
    font-size: 14px;
}

.tip-row strong {
    font-size: 15px;
}

.tip-row button {
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    color: #9ba8b0;
    font-size: 20px;
    border-radius: 5px;
}

.tip-row button:hover {
    background: #fbeaea;
    color: var(--danger);
}

.tip-list-total {
    border-top: 2px solid var(--border);
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tip-list-total span {
    color: var(--muted);
    font-size: 11px;
    font-weight: bold;
}

.tip-list-total strong {
    font-size: 21px;
}


/* ZAVRŠETAK DANA */

.bottom-bar {
    background: var(--navy);
    color: white;
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.bottom-bar span {
    font-weight: bold;
    font-size: 14px;
}

.bottom-bar p {
    color: #afc0cb;
    font-size: 12px;
    margin: 5px 0 0;
}

.finish-button {
    border: 0;
    border-radius: 8px;
    background: var(--gold);
    color: #182a35;
    padding: 13px 24px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.finish-button:hover {
    filter: brightness(0.96);
}


/* TABLET */

@media (max-width: 1100px) {

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .intervals {
        grid-template-columns: repeat(6, 1fr);
    }

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


/* MOBILNI */

@media (max-width: 650px) {

    .topbar {
        padding: 17px 20px;
    }

    .topbar h1 {
        font-size: 22px;
    }

    main {
        width: calc(100% - 24px);
        margin-top: 15px;
    }

    .card {
        padding: 17px;
        border-radius: 11px;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .intervals {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .primary-button {
        width: 100%;
    }

    .bottom-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .finish-button {
        width: 100%;
    }

    .datum strong {
        font-size: 14px;
    }
}
