:root {
    --bg0: #0b1220;
    --bg1: #0f1b33;
    --card: rgba(255, 255, 255, 0.92);
    --cardBorder: rgba(15, 23, 42, 0.12);
    --text: #0f172a;
    --muted: #475569;
    --field: rgba(255, 255, 255, 0.95);
    --fieldBorder: rgba(15, 23, 42, 0.18);
    --focus: rgba(59, 130, 246, 0.35);
    --primary: #2563eb;
    --primaryHover: #1d4ed8;
    --danger: #b91c1c;
    --dangerBg: rgba(185, 28, 28, 0.08);
    --success: #15803d;
    --successBg: rgba(21, 128, 61, 0.08);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    background-image:
        linear-gradient(135deg, rgba(15, 23, 41, 0.80) 0%, rgba(26, 40, 71, 0.76) 50%, rgba(15, 23, 41, 0.82) 100%),
        url('./css/login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.auth {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 28px 16px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid var(--cardBorder);
    background: var(--card);
    box-shadow:
        0 12px 45px rgba(0, 0, 0, 0.35),
        0 1px 0 rgba(255, 255, 255, 0.35) inset;
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    padding: 6px 6px 14px;
}


.logo-slot {
    width: 180px;
    height: 90px;
    margin: -30px auto 10px;
    display: grid;
    place-items: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text {
    font-weight: 800;
    letter-spacing: 0.2px;
    color: rgba(15, 23, 42, 0.86);
    margin-bottom: 2px;
}

.login-header h1 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

form {
    margin-top: 12px;
    display: grid;
    gap: 12px;
}

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

.field label {
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.85);
    font-weight: 600;
}

.field input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 10px;
    border: 1px solid var(--fieldBorder);
    background: var(--field);
    color: var(--text);
    outline: none;
    transition: box-shadow 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.field input::placeholder {
    color: rgba(71, 85, 105, 0.75);
}

.field input:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px var(--focus);
}

button {
    width: 100%;
    padding: 12px 12px;
    border-radius: 10px;
    border: 0;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
}

button.primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
    transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

button.primary:hover {
    background: var(--primaryHover);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

button.primary:active {
    transform: translateY(0);
}

.auth-links {
    display: flex;
    justify-content: center;
    padding-top: 2px;
}

.reset-link {
    font-size: 0.95rem;
    color: rgba(37, 99, 235, 0.95);
    text-decoration: none;
    font-weight: 600;
}

.reset-link:hover {
    text-decoration: underline;
}

.error,
.success {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    text-align: center;
}

.error {
    color: var(--danger);
    background: var(--dangerBg);
    border: 1px solid rgba(185, 28, 28, 0.20);
}

.success {
    color: var(--success);
    background: var(--successBg);
    border: 1px solid rgba(21, 128, 61, 0.20);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}