:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #68748a;
    --line: #dfe5ef;
    --primary: #1667d9;
    --primary-hover: #0f58bd;
    --danger: #b42318;
    --success: #087a52;
    --focus: rgba(22, 103, 217, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input {
    font: inherit;
}

/* =====================================================
   AUTH LAYOUT
   ===================================================== */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 46%) 1fr;
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 48px 56px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(255, 255, 255, 0.14),
            transparent 28%
        ),
        radial-gradient(
            circle at 85% 85%,
            rgba(91, 166, 255, 0.30),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            #0b397a 0%,
            #0e54b5 58%,
            #176dd7 100%
        );
}

.auth-brand::after {
    content: "";
    position: absolute;
    right: -180px;
    bottom: -180px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.brand-mark {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.06em;
}

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

.brand-logo {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #ffffff;
    color: #0d55b7;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.brand-copy {
    position: relative;
    z-index: 1;
    max-width: 570px;
    margin: auto 0;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.brand-copy h1 {
    margin: 16px 0 20px;
    font-size: clamp(42px, 4.4vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.brand-copy p {
    max-width: 520px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.7;
}

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.70);
}

/* =====================================================
   AUTH PANEL
   ===================================================== */

.auth-panel {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 40px 24px;
}

.auth-card {
    width: min(100%, 460px);
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(22, 40, 80, 0.09);
}

.auth-heading {
    margin-bottom: 28px;
}

.auth-heading h2 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.auth-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.mobile-logo {
    display: none;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--primary);
}

/* =====================================================
   BUTTONS
   ===================================================== */

.google-button,
.primary-button {
    width: 100%;
    min-height: 50px;
    border-radius: 12px;
    font-weight: 700;
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--line);
    color: var(--text);
    background: #ffffff;
}

.google-button:hover {
    border-color: #bdc8d8;
    background: #f9fbfd;
    text-decoration: none;
}

.google-button:active,
.primary-button:active {
    transform: translateY(1px);
}

.primary-button {
    border: 0;
    color: #ffffff;
    background: var(--primary);
    cursor: pointer;
}

.primary-button:hover {
    background: var(--primary-hover);
}

/* =====================================================
   DIVIDER
   ===================================================== */

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: #97a1b2;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* =====================================================
   FORM
   ===================================================== */

.auth-form {
    display: grid;
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    font-size: 14px;
    font-weight: 700;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.label-row a {
    font-size: 13px;
}

.field input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    color: var(--text);
    background: #ffffff;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.field input::placeholder {
    color: #9aa4b5;
}

.field input:hover {
    border-color: #c7d0de;
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--focus);
}

.field-error {
    color: var(--danger);
    font-size: 13px;
    line-height: 1.45;
}

.remember {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
}

.remember input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--primary);
}

/* =====================================================
   ALERTS
   Podržava i stare i nove nazive klasa
   ===================================================== */

.alert {
    margin: 0 0 20px;
    padding: 13px 14px;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.5;
}

.alert.error,
.alert.alert-error {
    color: var(--danger);
    background: #fff0ef;
    border: 1px solid #f6cfcb;
}

.alert.success,
.alert.alert-success {
    color: var(--success);
    background: #eaf9f3;
    border: 1px solid #cceee0;
}

/* =====================================================
   AUTH FOOTER LINKS
   ===================================================== */

.auth-note {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.back-link {
    display: inline-block;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 600;
}

/* =====================================================
   PORTAL
   ===================================================== */

.portal-header {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 clamp(20px, 5vw, 72px);
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.logout-button {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: #ffffff;
    cursor: pointer;
}

.logout-button:hover {
    border-color: #bdc8d8;
    background: #f9fbfd;
}

.portal-main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 70px 0;
}

.portal-welcome {
    max-width: 760px;
    margin-bottom: 38px;
}

.portal-welcome .eyebrow {
    color: var(--primary);
}

.portal-welcome h1 {
    margin: 10px 0 14px;
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.portal-welcome p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.portal-card {
    min-height: 190px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.portal-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e3;
    box-shadow: 0 16px 40px rgba(22, 40, 80, 0.07);
}

.portal-card h2 {
    margin: 0 0 11px;
    font-size: 19px;
}

.portal-card p {
    margin: 0 0 28px;
    color: var(--muted);
    line-height: 1.6;
}

.portal-card span {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 1100px) {
    .auth-shell {
        grid-template-columns: minmax(360px, 42%) 1fr;
    }

    .auth-brand {
        padding: 42px;
    }

    .brand-copy h1 {
        font-size: 46px;
    }
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
    }

    .mobile-logo {
        display: inline-block;
    }

    .portal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .auth-panel {
        padding: 18px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 18px;
        box-shadow: none;
    }

    .auth-heading h2 {
        font-size: 26px;
    }

    .label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .portal-main {
        width: min(100% - 28px, 1180px);
        padding: 42px 0;
    }

    .portal-welcome h1 {
        font-size: 32px;
    }

    .portal-grid {
        grid-template-columns: 1fr;
    }
}
/* =====================================================
   REZERVACIJE.HR - Å IRA REGISTRACIJSKA FORMA
   ===================================================== */

body.auth-register-page .auth-card.auth-card-register {
    width: 620px !important;
    max-width: calc(100vw - 48px) !important;
}

@media (max-width: 700px) {
    body.auth-register-page .auth-card.auth-card-register {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 22px !important;
        padding-right: 22px !important;
    }
}

/* =====================================================
   REZERVACIJE.HR - RESPONSIVE REGISTRATION CARD
   ===================================================== */

/* Desktop */
body.auth-register-page .auth-panel {
    padding-left: 36px;
    padding-right: 36px;
}

body.auth-register-page .auth-card.auth-card-register {
    width: 100% !important;
    max-width: 620px !important;
}

/* Manji laptop / veÄ‡i tablet */
@media (max-width: 1100px) {
    body.auth-register-page .auth-panel {
        padding-left: 28px;
        padding-right: 28px;
    }

    body.auth-register-page .auth-card.auth-card-register {
        width: 100% !important;
        max-width: 560px !important;
    }
}

/* Tablet - lijevi plavi dio se veÄ‡ skriva u postojeÄ‡em CSS-u */
@media (max-width: 900px) {
    body.auth-register-page .auth-panel {
        width: 100%;
        padding: 32px 24px;
    }

    body.auth-register-page .auth-card.auth-card-register {
        width: 100% !important;
        max-width: 620px !important;
        margin: 0 auto;
    }
}

/* Mobitel */
@media (max-width: 600px) {
    body.auth-register-page .auth-panel {
        padding: 14px;
        align-items: start;
    }

    body.auth-register-page .auth-card.auth-card-register {
        width: 100% !important;
        max-width: none !important;
        padding: 26px 20px !important;
        border-radius: 18px;
    }

    body.auth-register-page .auth-heading h2 {
        font-size: 26px;
    }

    body.auth-register-page .auth-form {
        gap: 16px;
    }

    body.auth-register-page .field input {
        min-height: 48px;
    }
}

/* Vrlo mali mobiteli */
@media (max-width: 380px) {
    body.auth-register-page .auth-panel {
        padding: 10px;
    }

    body.auth-register-page .auth-card.auth-card-register {
        padding: 22px 16px !important;
        border-radius: 15px;
    }
}
