/* n360-login.css v1.2 - 3rd Sep 2026 - WCAG 2.2 batch 1: tokens moved to n360-tokens.css, the sign-in button reads (F1)  VERIFY-A11YB1-03SEP2026-K7WQD */
/* (was v1.1 - 6th Jul 2026 20:24  VERIFY-100Y-LOGINTHEME VERIFY-100Z-ICONFIX) */
/* N360 DESIGN TOKENS incl. --n360-text - DECLARED IN n360-tokens.css (loaded right after Bootstrap on every page). Do not re-add a :root block here. */

/* LOGIN SURFACE - a page decision, not a palette token, so it is scoped to body rather than :root.
   Light: white (Bootstrap's own body colour, so nothing to declare). Dark: the app's dark page
   colour with the light ink the login has always used. The --n360-cyan flip in dark mode that used
   to live here (cyan became #005a84 so white text on the sign-in button would pass) is now written
   by Login.cshtml's branding block, which also derives --n360-on-cyan for whichever accent is in
   force - see the @functions block in that page. */
[data-bs-theme="dark"] body {
    --bs-body-bg: var(--n360-bg);
    --bs-body-color: var(--n360-text);
    --bs-border-color: #333333;
}

body, html {
    height: 100%;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5 {
    font-family: 'Outfit', sans-serif;
    color: var(--n360-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* LAYOUT & BLUR */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    transition: filter 0.4s ease-in-out, transform 0.4s ease-in-out;
}

body.modal-open .login-wrapper {
    filter: blur(8px) brightness(0.85);
    pointer-events: none;
}

.login-brand-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--n360-dark) 0%, var(--n360-primary) 100%);
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 992px) {
    .login-brand-panel {
        display: flex;
    }
}

/* Global Radar Effect */
.login-brand-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, transparent 20%, rgba(0,0,0,0.4) 100%), repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.04) 0, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 60px), repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 60px), repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 60px);
    pointer-events: none;
}

.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--bs-body-bg);
    transition: background-color 0.3s ease;
}

.login-card {
    width: 100%;
    max-width: 420px;
    z-index: 10;
}

/* Inputs */
.form-floating > label {
    color: #888;
    transition: all 0.2s ease;
}

.form-floating > .form-control {
    background-color: transparent;
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
}

    .form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label {
        color: var(--n360-primary);
        font-weight: 600;
    }

.form-control:focus {
    border-color: var(--n360-cyan);
    box-shadow: 0 0 0 0.25rem rgba(0, 189, 231, 0.15);
}

/* Buttons */
.btn-signin {
    background-color: var(--n360-cyan);
    color: var(--n360-on-cyan); /* v1.2: F1 - white on cyan was 2.23:1. Navy on cyan is 5.87:1; the token is white under a red or blue accent */
    font-weight: 600;
    padding: 0.8rem;
    border: none;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-signin:hover {
        background-color: var(--n360-primary-fill);
        color: var(--n360-on-primary);
    }
    /* Dark mode: the base button is already on the primary (the branding block swaps the accent
       and primary over in dark), so a hover onto primary-fill would be invisible. Lift the same
       fill instead - a brighter dark fill stays well over 4.5:1 under white whatever the brand. */
    [data-bs-theme="dark"] .btn-signin:hover {
        background-color: var(--n360-cyan);
        color: var(--n360-on-cyan);
        filter: brightness(1.2);
    }

.neooptic-logo {
    width: 120px;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 10;
}

    .neooptic-logo:hover {
        opacity: 1;
    }

/* MODAL SPRING ANIMATION */
[data-bs-theme="light"] .modal-backdrop {
    background-color: rgba(0, 5, 10, 0.6) !important;
}

.modal-backdrop {
    backdrop-filter: blur(0px);
    transition: opacity 0.3s ease, backdrop-filter 0.3s ease;
}

    .modal-backdrop.show {
        backdrop-filter: blur(6px);
    }

.modal.fade .modal-dialog {
    transform: scale(0.95) translateY(-20px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease-out;
}

#dynamicTagline {
    transition: opacity 0.6s ease-in-out;
    min-height: 60px;
}
/* --- Refactored Inline Styles --- */
.n360-theme-wrapper {
    z-index: 1030;
}

.n360-z-index-10 {
    z-index: 10;
}

.n360-brand-heading {
    font-size: 3rem;
}

.n360-brand-tagline {
    max-width: 400px;
    font-weight: 400;
}

.n360-main-logo {
    max-height: 80px;
    transition: opacity 0.3s ease;
}

.n360-mobile-logo {
    max-height: 45px;
    opacity: 0.85;
}

/* 1. Standardise the Alert Summary */
.validation-clean ul {
    margin-bottom: 0;
    padding-left: 0;
    list-style-type: none;
}

.bg-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* 2. Target the MVC Error class without changing Razor code */
.input-validation-error {
    border-color: var(--n360-danger) !important;
    padding-right: calc(1.5em + 0.75rem) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right calc(0.375em + 0.1875rem) center !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
}

    /* 3. Highlight the floating label when the input is in error */
    .input-validation-error ~ label {
        color: var(--n360-danger) !important;
    }

/* 4. Formatting the individual field message */
.field-validation-error {
    display: block;
    color: var(--n360-danger);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Themed icon colours (the theme toggle, label and key icons follow the
   active theme's accent/primary instead of a hardcoded colour). */
.text-n360-accent { color: var(--n360-cyan) !important; }
.text-n360-primary { color: var(--n360-primary) !important; }

/* Neutralise Chrome's pale-blue autofill so a filled username/password matches
   the form (transparent-on-body) instead of Chrome's own colour. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--bs-body-bg) inset !important;
    -webkit-text-fill-color: var(--bs-body-color) !important;
    caret-color: var(--bs-body-color);
    transition: background-color 100000s ease-in-out 0s;
}
