/* Prijava (login, kod, zaboravljena i nova lozinka).
 * Manji ekrani: samo kartica na sredini (stil iz admin-css.css).
 * Od 1024 px: dvije jednake polovice iste visine; lijevo plava ploča Winkle s pravim kalendarom, desno obrazac. */
@font-face { font-family: 'Unbounded'; src: url('/fonts/unbounded-latin.woff2') format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Unbounded'; src: url('/fonts/unbounded-latin-ext.woff2') format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.login-env-copy { display: none; }

/* Manji ekrani: kartica ima jednak razmak od svih rubova (16 px, kao lijevo i desno). */
@media (max-width: 1023px) {
    body { padding: 16px 0; box-sizing: border-box; }
    .login-panel { margin: auto; }
}

@media (min-width: 1024px) {
    body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 16px; gap: 16px; align-items: stretch; }
    .login-env, .login-panel { box-sizing: border-box; width: auto; min-width: 0; height: calc(100dvh - 32px); min-height: 680px; border-radius: 28px; margin: 0; }
    .login-env {
        display: block; position: relative; overflow: hidden;
        background: radial-gradient(70% 60% at 80% 100%, rgba(236, 72, 153, 0.35), rgba(236, 72, 153, 0) 70%), radial-gradient(60% 50% at 10% 0%, rgba(109, 74, 255, 0.55), rgba(109, 74, 255, 0) 70%), #17123a;
    }
    .login-env::before { content: none; }
    .login-env-copy { display: block; position: absolute; top: 48px; left: 48px; right: 48px; color: #fff; }
    .login-env-brand { display: inline-flex; align-items: center; gap: 12px; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 1.75rem; letter-spacing: -0.01em; }
    .login-env-brand img { filter: hue-rotate(38deg); border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }
    /* Živi kalendar u Winklinom stilu: naslov u dva reda (drugi na nagnutom bijelom bloku), termini „udaraju” jedan za
       drugim, pečat „Bez poziva”, obavijest; krug 8 s, na kraju sve odleti gore i kreće ispočetka. */
    .wk-head { margin: 22px 0 0; font-family: 'Unbounded', sans-serif; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-size: clamp(1.9rem, 2.6vw, 2.6rem); }
    .wk-head span { display: block; }
    .wk-l2 { display: inline-block !important; margin-top: 8px; padding: 6px 16px 10px; background: #fff; color: #6d4aff; transform: rotate(-2deg); transform-origin: 0 50%; border-radius: 6px; }
    .wk-cal {
        --row: 84px; --gut: 60px;
        position: absolute; left: 50%; top: 300px; bottom: -80px; width: min(82%, 540px);
        transform: translateX(-50%) rotate(-3deg); transform-origin: 50% 0;
        background: #fff; border-radius: 24px; padding: 18px 18px 0; color: #1b2230;
        box-shadow: 0 40px 80px -24px rgba(10, 4, 40, 0.55);
    }
    .wk-cal-head { display: grid; grid-template-columns: var(--gut) 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .wk-cal-head b { display: block; padding: 10px 6px; border-radius: 12px; background: #eef2f9; text-align: center; font-size: 15px; font-weight: 700; line-height: 1.25; }
    .wk-cal-head small { display: block; font-size: 12px; font-weight: 500; color: #5d6676; }
    .wk-cal-body {
        position: relative; height: calc(var(--row) * 8);
        background: repeating-linear-gradient(180deg, #e8ecf3 0 1px, transparent 1px var(--row)) var(--gut) 0 / calc(100% - var(--gut)) 100% no-repeat;
    }
    .wk-cal-body::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gut) + (100% - var(--gut)) / 2); width: 1px; background: #e8ecf3; }
    .wk-cal-body i { position: absolute; left: 0; top: calc(var(--r) * var(--row) - 8px); font-style: normal; font-size: 13px; color: #6b7383; }
    .wk-bk {
        position: absolute; z-index: 1; box-sizing: border-box; overflow: hidden;
        top: calc(var(--s) * var(--row) + 4px); height: calc(var(--l) * var(--row) - 8px);
        left: calc(var(--gut) + (var(--c) - 1) * (100% - var(--gut)) / 2 + 5px); width: calc((100% - var(--gut)) / 2 - 10px);
        padding: 10px 12px; border-radius: 14px; background: #ebe5ff; border-left: 4px solid #6d4aff; line-height: 1.3;
    }
    .wk-bk b { display: block; font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .wk-bk span { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; color: #6d4aff; }
    .wk-bk em { display: block; margin-top: 2px; font-size: 13px; font-style: normal; color: #5d6676; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .wk-stamp {
        position: absolute; z-index: 4; right: 9%; top: 52%; padding: 10px 22px; border: 5px solid #6d4aff; border-radius: 14px;
        background: rgba(255, 255, 255, 0.94); color: #6d4aff; font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 2.1rem; letter-spacing: -0.02em;
        transform: rotate(-9deg); box-shadow: 0 20px 40px -16px rgba(10, 4, 40, 0.45); opacity: 0;
    }
    .wk-toast {
        position: absolute; z-index: 3; left: 44px; bottom: 52px; display: flex; align-items: center; gap: 12px;
        padding: 12px 20px 12px 12px; border-radius: 16px; background: #fff; color: #1b2230;
        box-shadow: 0 24px 50px -18px rgba(10, 4, 40, 0.55); opacity: 0;
    }
    .wk-toast > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #16b364; color: #fff; font-weight: 800; }
    .wk-toast b { display: block; font-size: 15px; }
    .wk-toast small { display: block; font-size: 13px; color: #5d6676; }
    .login-panel {
        width: auto; max-width: none; padding: 48px; overflow-y: auto;
        display: flex; flex-direction: column; justify-content: center; align-items: center;
    }
    .login-inner { width: 100%; max-width: 400px; }
}
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .wk-l1 { animation: wk-up 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    .wk-l2 { animation: wk-slam 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-up { 0% { opacity: 0; transform: translateY(24px); } 5%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: translateY(-24px); } }
    @keyframes wk-slam { 0%, 3% { opacity: 0; transform: rotate(-2deg) scale(1.6); } 7% { opacity: 1; transform: rotate(-2deg) scale(.94); } 9.5%, 90% { opacity: 1; transform: rotate(-2deg) scale(1); } 96%, 100% { opacity: 0; transform: rotate(-2deg) translateY(-24px); } }
    .wk-cal { animation: wk-cal 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-cal { 0% { opacity: 0; transform: translateX(-50%) translateY(60px) rotate(-3deg); } 6%, 90% { opacity: 1; transform: translateX(-50%) rotate(-3deg); } 97%, 100% { opacity: 0; transform: translateX(-50%) translateY(-50px) rotate(-3deg); } }
    .wk-bk:nth-child(9) { animation: wk-bk0 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-bk0 { 0%, 12.50% { opacity: 0; transform: translateY(-18px) scale(1.25); } 15.00% { opacity: 1; transform: scale(.96); } 17.00%, 100% { opacity: 1; transform: none; } }
    .wk-bk:nth-child(10) { animation: wk-bk1 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-bk1 { 0%, 16.50% { opacity: 0; transform: translateY(-18px) scale(1.25); } 19.00% { opacity: 1; transform: scale(.96); } 21.00%, 100% { opacity: 1; transform: none; } }
    .wk-bk:nth-child(11) { animation: wk-bk2 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-bk2 { 0%, 20.50% { opacity: 0; transform: translateY(-18px) scale(1.25); } 23.00% { opacity: 1; transform: scale(.96); } 25.00%, 100% { opacity: 1; transform: none; } }
    .wk-bk:nth-child(12) { animation: wk-bk3 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-bk3 { 0%, 24.50% { opacity: 0; transform: translateY(-18px) scale(1.25); } 27.00% { opacity: 1; transform: scale(.96); } 29.00%, 100% { opacity: 1; transform: none; } }
    .wk-bk:nth-child(13) { animation: wk-bk4 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-bk4 { 0%, 28.50% { opacity: 0; transform: translateY(-18px) scale(1.25); } 31.00% { opacity: 1; transform: scale(.96); } 33.00%, 100% { opacity: 1; transform: none; } }
    .wk-bk:nth-child(14) { animation: wk-bk5 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-bk5 { 0%, 32.50% { opacity: 0; transform: translateY(-18px) scale(1.25); } 35.00% { opacity: 1; transform: scale(.96); } 37.00%, 100% { opacity: 1; transform: none; } }
    .wk-bk:nth-child(15) { animation: wk-bk6 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-bk6 { 0%, 36.50% { opacity: 0; transform: translateY(-18px) scale(1.25); } 39.00% { opacity: 1; transform: scale(.96); } 41.00%, 100% { opacity: 1; transform: none; } }
    .wk-bk:nth-child(16) { animation: wk-bk7 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-bk7 { 0%, 40.50% { opacity: 0; transform: translateY(-18px) scale(1.25); } 43.00% { opacity: 1; transform: scale(.96); } 45.00%, 100% { opacity: 1; transform: none; } }
    .wk-stamp { animation: wk-stamp 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-stamp { 0%, 48% { opacity: 0; transform: rotate(-9deg) scale(2.2); } 52% { opacity: 1; transform: rotate(-9deg) scale(.92); } 55% { transform: rotate(-9deg) scale(1.04); } 58%, 88% { opacity: 1; transform: rotate(-9deg) scale(1); } 94%, 100% { opacity: 0; transform: rotate(-9deg) translateY(-30px); } }
    .wk-toast { animation: wk-toast 8s cubic-bezier(0.23, 1, 0.32, 1) infinite; }
    @keyframes wk-toast { 0%, 58% { opacity: 0; transform: translateY(24px); } 63%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(-16px); } }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) { .wk-stamp, .wk-toast { opacity: 1; } }

/* The card heading is the page's h1 (screen readers), styled as before */
.login-form-card h1.login-heading { font-size: var(--vb-text-xl); font-weight: 600; letter-spacing: var(--vb-tracking-tight); margin: 0 0 1.75rem; color: var(--vb-text-primary); line-height: 1.3; }
@media (max-width: 1023px) { .login-form-card h1.login-heading { font-size: var(--vb-text-lg); margin-bottom: 1.25rem; } }
/* While the cookie notice is open it must not cover the last links of the card */
body:has(.wk-cookie) { padding-bottom: 9.5rem; }
@media (min-width: 1024px) { body:has(.wk-cookie) { padding-bottom: 16px; } }
.login-form-card .vb-checkbox-label { min-height: 2.75rem; display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.login-form-card .vb-checkbox-label input { width: 1.125rem; height: 1.125rem; accent-color: var(--vb-accent); }
/* Touch: secondary links of the card are 44px targets too */
@media (pointer: coarse) {
    .login-aux-link, .login-alt-link { display: inline-flex; align-items: center; gap: .375rem; min-height: 2.75rem; }
    .login-alt { row-gap: 0; }
}
