﻿/* wwwroot/css/login.css */

/* —— Brand & tema (SVETLO) —— */
:root {
    --brand-red: #CC0719;
    --brand-yellow: #FFD401;
    --bg: #f7f7f8; /* pozadina stranice */
    --surface: #ffffff; /* kartica */
    --text: #111827; /* glavna boja teksta */
    --muted: #6b7280; /* sekundarni tekst */
    --border: #e5e7eb; /* ivice */
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 24px rgba(17,24,39,.08);
}

body {
    background: radial-gradient(1200px 600px at 12% -10%, rgba(204,7,25,.06), transparent 60%), radial-gradient(900px 500px at 100% 10%, rgba(255,212,1,.10), transparent 60%), var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans";
}

/* Naslov */
h2 {
    text-align: center;
    margin: 48px 0 16px;
    letter-spacing: .3px;
    font-weight: 800;
}

/* Forma (pogađa i bez klase, ali preporučujem class="login-form") */
form.login-form,
form[action$="Login"] {
    max-width: 380px;
    margin: 0 auto 64px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
}

    /* Polja */
    form.login-form div,
    form[action$="Login"] > div {
        display: grid;
        gap: 6px;
    }

label {
    font-size: 14px;
    color: var(--muted);
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input:not([type]) {
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

input::placeholder {
    color: #9ca3af;
}

input:focus {
    border-color: var(--brand-yellow);
    box-shadow: 0 0 0 4px rgba(255,212,1,.22);
    background: #fffef5;
}

/* Dugme (sa loader-om) */
button[type="submit"] {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 800;
    letter-spacing: .2px;
    color: #111; /* na žuto-crvenom gradientu čitljivije je tamno */
    background: linear-gradient(90deg, var(--brand-yellow), var(--brand-red));
    transition: transform .08s ease, filter .2s ease, box-shadow .2s ease;
    box-shadow: 0 6px 16px rgba(204,7,25,.18);
}

    button[type="submit"]:hover {
        filter: brightness(1.03);
        box-shadow: 0 8px 20px rgba(204,7,25,.22);
    }

    button[type="submit"]:active {
        transform: translateY(1px);
    }

    /* Loader stanje */
    button[type="submit"].is-loading {
        color: transparent; /* sakrij tekst */
        pointer-events: none;
    }

        button[type="submit"].is-loading::after {
            content: "";
            position: absolute;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            border: 2px solid rgba(0,0,0,.18); /* track */
            border-top-color: #111; /* spinner */
            animation: sw-spin .8s linear infinite;
        }

/* Onemogućeno */
button[disabled] {
    opacity: .7;
    cursor: not-allowed;
}

/* Validacije */
.validation-errors,
div[style*="color:red"] {
    max-width: 380px;
    margin: 12px auto 0;
    color: #7f1d1d;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
}

/* Animacije */
@keyframes sw-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Poštovanje smanjene animacije */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
