/*-------------------------------------------------------*/
/* nineyard admin - authentication pages
/*-------------------------------------------------------*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --ny-blue: #3b7bff;
    --ny-blue-dark: #2456d6;
    --ny-blue-light: #e8efff;
    --ny-ink: #0d1220;
    --ny-body: #5a6478;
    --ny-line: #e3e7ef;
    --ny-danger: #e03131;
    --ny-radius: 12px;
    --ny-font: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

.ny-auth,
.ny-auth body {
    height: 100%;
}

body.ny-auth {
    margin: 0;
    font-family: var(--ny-font);
    color: var(--ny-ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.ny-shell {
    display: flex;
    min-height: 100vh;
}

/*--------------- Brand panel ---------------*/
.ny-brand {
    position: relative;
    flex: 0 0 46%;
    max-width: 620px;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(158deg, #0b1224 0%, #142253 48%, #1e3fb0 100%);
}

.ny-brand::before {
    /* dot grid echoing the nineyard mark */
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1.5px, transparent 1.5px);
    background-size: 26px 26px;
    opacity: .5;
}

.ny-brand::after {
    /* soft brand glow */
    content: "";
    position: absolute;
    width: 620px;
    height: 620px;
    right: -240px;
    bottom: -300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 123, 255, .75) 0%, rgba(59, 123, 255, 0) 68%);
    animation: ny-float 14s ease-in-out infinite;
}

@keyframes ny-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(-26px, -34px, 0); }
}

.ny-brand > * {
    position: relative;
    z-index: 1;
}

.ny-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ny-logo svg {
    width: 42px;
    height: 42px;
    flex: none;
    color: #fff;
}

.ny-logo,
.ny-logo:hover,
.ny-logo:focus {
    color: #fff;
    text-decoration: none;
}

.ny-logo .ny-wordmark {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1;
}

.ny-logo .ny-tm {
    font-size: 11px;
    vertical-align: super;
    font-weight: 500;
    opacity: .7;
}

.ny-brand-body {
    margin: auto 0;
    padding: 40px 0;
}

.ny-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    margin-bottom: 26px;
}

.ny-brand h1 {
    font-size: 44px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.02em;
    margin: 0 0 18px;
}

.ny-brand h1 span {
    background: linear-gradient(90deg, #9dc0ff, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ny-brand p.ny-lead {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .72);
    max-width: 420px;
    margin: 0 0 34px;
}

.ny-points {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ny-points li {
    display: flex;
    align-items: center;
    gap: 13px;
    font-size: 15px;
    color: rgba(255, 255, 255, .88);
    padding: 9px 0;
}

.ny-points .ny-tick {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
}

.ny-points .ny-tick svg {
    width: 13px;
    height: 13px;
}

.ny-brand-foot {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
}

/*--------------- Form panel ---------------*/
.ny-panel {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 32px 24px 40px;
    background:
        radial-gradient(900px 420px at 100% 0%, #f2f6ff 0%, rgba(255, 255, 255, 0) 60%),
        #fff;
}

.ny-panel-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ny-body);
    min-height: 28px;
}

.ny-panel-top .ny-mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    font-size: 20px;
    font-weight: 600;
    color: var(--ny-ink);
}

.ny-panel-top .ny-mobile-logo svg {
    width: 26px;
    height: 26px;
    color: var(--ny-blue);
}

.ny-card {
    width: 100%;
    max-width: 396px;
    margin: auto;
    padding: 24px 0;
}

.ny-card h2 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.02em;
    margin: 0 0 8px;
}

.ny-card .ny-sub {
    font-size: 15px;
    color: var(--ny-body);
    margin: 0 0 30px;
    line-height: 1.6;
}

/*--------------- Fields ---------------*/
.ny-field {
    position: relative;
    margin-bottom: 18px;
}

.ny-field input.form-control,
.ny-field input[type="text"],
.ny-field input[type="email"],
.ny-field input[type="password"] {
    width: 100%;
    height: 58px;
    padding: 24px 16px 8px;
    font-size: 15px;
    line-height: 1.3;
    font-family: inherit;
    color: var(--ny-ink);
    background: #fff;
    border: 1.5px solid var(--ny-line);
    border-radius: var(--ny-radius);
    box-shadow: none;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ny-field.has-toggle input {
    padding-right: 50px;
}

.ny-field input:hover {
    border-color: #cdd6e6;
}

.ny-field input:focus {
    border-color: var(--ny-blue);
    box-shadow: 0 0 0 4px rgba(59, 123, 255, .14);
}

.ny-field label {
    position: absolute;
    left: 17px;
    top: 19px;
    margin: 0;
    font-size: 15px;
    color: #8b95a8;
    pointer-events: none;
    transition: all .16s ease;
}

.ny-field input:focus + label,
.ny-field input:not(:placeholder-shown) + label {
    top: 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ny-blue);
}

.ny-field input:not(:focus):not(:placeholder-shown) + label {
    color: #8b95a8;
}

/* Keep Chrome's autofill from repainting the field yellow */
.ny-field input:-webkit-autofill,
.ny-field input:-webkit-autofill:hover,
.ny-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ny-ink);
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    caret-color: var(--ny-ink);
}

.ny-field input.input-validation-error {
    border-color: #f3b0b0;
    background: #fffafa;
}

.ny-field input.input-validation-error:focus {
    border-color: var(--ny-danger);
    box-shadow: 0 0 0 4px rgba(224, 49, 49, .12);
}

.ny-error {
    display: block;
    font-size: 12.5px;
    color: var(--ny-danger);
    margin-top: 6px;
    padding-left: 2px;
}

.ny-error:empty {
    display: none;
}

.ny-toggle {
    position: absolute;
    right: 8px;
    top: 29px; /* half of the 58px input, so errors below don't shift it */
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    padding: 0;
    border-radius: 9px;
    background: transparent;
    color: #8b95a8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s ease, background .15s ease;
}

.ny-toggle:hover {
    color: var(--ny-blue);
    background: var(--ny-blue-light);
}

.ny-toggle svg {
    width: 19px;
    height: 19px;
}

.ny-toggle .ny-eye-off {
    display: none;
}

.ny-toggle.is-visible .ny-eye-off {
    display: block;
}

.ny-toggle.is-visible .ny-eye-on {
    display: none;
}

/*--------------- Row / checkbox / links ---------------*/
.ny-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 26px;
}

.ny-check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--ny-body);
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.ny-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid #cdd6e6;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: all .15s ease;
    flex: none;
}

.ny-check input:checked {
    background: var(--ny-blue);
    border-color: var(--ny-blue);
}

.ny-check input:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ny-check input:focus-visible {
    box-shadow: 0 0 0 4px rgba(59, 123, 255, .18);
}

.ny-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--ny-blue);
    text-decoration: none;
    transition: color .15s ease;
}

.ny-link:hover,
.ny-link:focus {
    color: var(--ny-blue-dark);
    text-decoration: none;
}

/*--------------- Button ---------------*/
.ny-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: var(--ny-radius);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--ny-blue) 0%, var(--ny-blue-dark) 100%);
    box-shadow: 0 8px 20px rgba(59, 123, 255, .28);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ny-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(59, 123, 255, .34);
}

.ny-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(59, 123, 255, .26);
}

.ny-btn:focus-visible {
    outline: 3px solid rgba(59, 123, 255, .4);
    outline-offset: 2px;
}

.ny-btn[disabled],
.ny-btn.is-loading {
    opacity: .75;
    cursor: default;
    transform: none;
}

.ny-btn .ny-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ny-spin .7s linear infinite;
}

.ny-btn.is-loading .ny-spinner {
    display: block;
}

@keyframes ny-spin {
    to { transform: rotate(360deg); }
}

.ny-btn-ghost {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ny-body);
    text-decoration: none;
}

.ny-btn-ghost:hover {
    color: var(--ny-blue);
    text-decoration: none;
}

/*--------------- Alerts ---------------*/
.ny-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.55;
    padding: 13px 15px;
    border-radius: var(--ny-radius);
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.ny-alert svg {
    width: 17px;
    height: 17px;
    flex: none;
    margin-top: 1px;
}

.ny-alert-error {
    color: #a52121;
    background: #fdf1f1;
    border-color: #f6d5d5;
}

.ny-alert-info {
    color: #1b3f9c;
    background: var(--ny-blue-light);
    border-color: #cddcff;
}

/*--------------- Footer ---------------*/
.ny-panel-foot {
    text-align: center;
    font-size: 12.5px;
    color: #98a2b3;
}

.ny-panel-foot a {
    color: #98a2b3;
    text-decoration: none;
}

.ny-panel-foot a:hover {
    color: var(--ny-blue);
}

/*--------------- Responsive ---------------*/
@media (max-width: 1200px) {
    .ny-brand {
        flex-basis: 42%;
        padding: 40px 40px;
    }

    .ny-brand h1 {
        font-size: 38px;
    }
}

@media (max-width: 991px) {
    .ny-brand {
        display: none;
    }

    .ny-panel {
        padding: 22px 20px 32px;
    }

    .ny-panel-top .ny-mobile-logo {
        display: flex;
    }

    .ny-card {
        max-width: 400px;
    }

    .ny-card h2 {
        font-size: 26px;
    }
}

@media (max-width: 400px) {
    .ny-row {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Honour reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .ny-brand::after,
    .ny-btn,
    .ny-field input,
    .ny-spinner {
        animation: none !important;
        transition: none !important;
    }
}
