/* ==========================================================================
   Go-Daikin Light Commercial — Login page (modern glassmorphism design)
   Loaded only by Views/Login/Login.cshtml (Layout = null).
   ========================================================================== */

:root {
    --daikin-blue: #007AC2;
    --daikin-blue-dark: #005A92;
    --daikin-blue-deep: #003A66;
    --daikin-cyan: #38BDF8;
    --ink: #0f1c2b;
    --muted: #66788c;
    --line: #e2e8f0;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    color: var(--ink);
    overflow-x: hidden;
}

/* Inter everywhere on this page (beats custom-overrides' !important system font) */
body, .auth-card h2, .auth-card h4, .auth-card p, .auth-card li,
.auth-card label, .auth-card input, .auth-card button, .auth-card a,
.auth-card span, .auth-card small, .auth-card strong,
.auth-footer, .custom-alert {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* ---------- Animated aurora background ---------- */
.aurora {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
}

.blob-1 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.85), transparent 70%);
    top: -140px; left: -120px;
    animation: drift1 22s ease-in-out infinite alternate;
}

.blob-2 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, rgba(0, 122, 194, 0.5), transparent 70%);
    bottom: -180px; right: -140px;
    animation: drift2 26s ease-in-out infinite alternate;
}

.blob-3 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(186, 230, 253, 0.9), transparent 70%);
    top: 42%; left: 56%;
    animation: drift3 30s ease-in-out infinite alternate;
}

@keyframes drift1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(130px, 90px) scale(1.15); }
}

@keyframes drift2 {
    from { transform: translate(0, 0) scale(1.1); }
    to   { transform: translate(-150px, -100px) scale(0.95); }
}

@keyframes drift3 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-110px, 70px) scale(1.2); }
}

/* ---------- Layout ---------- */
.auth-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* ---------- Glass card ---------- */
.auth-card {
    width: 100%;
    max-width: 980px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 24px 70px rgba(0, 58, 102, 0.22),
        0 4px 16px rgba(0, 58, 102, 0.08);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card.shake {
    animation:
        cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both,
        shakeX 0.45s 0.55s ease;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shakeX {
    10%, 90%       { transform: translateX(-2px); }
    20%, 80%       { transform: translateX(3px); }
    30%, 50%, 70%  { transform: translateX(-5px); }
    40%, 60%       { transform: translateX(5px); }
}

/* ---------- Brand panel ---------- */
.auth-brand {
    position: relative;
    padding: 48px 44px;
    color: #fff;
    background:
        linear-gradient(155deg, rgba(0, 58, 102, 0.94) 0%, rgba(0, 90, 146, 0.88) 45%, rgba(0, 122, 194, 0.85) 100%),
        url('../img/image-sign-in.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
}

/* travelling light sheen */
.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.10) 50%, transparent 60%);
    transform: translateX(-130%) skewX(-15deg);
    animation: sheen 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sheen {
    0%        { transform: translateX(-130%) skewX(-15deg); }
    55%, 100% { transform: translateX(240%) skewX(-15deg); }
}

.ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    pointer-events: none;
}

.ring-1 { width: 280px; height: 280px; right: -90px; bottom: -90px; background: rgba(255, 255, 255, 0.06); border: none; }
.ring-2 { width: 180px; height: 180px; right: -40px; bottom: 40px; }
.ring-3 { width: 120px; height: 120px; left: -50px; top: -50px; background: rgba(255, 255, 255, 0.05); border: none; }

.brand-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeUp 0.6s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-logo {
    background: #fff;
    border-radius: 12px;
    padding: 9px 14px;
    display: inline-flex;
    box-shadow: 0 6px 18px rgba(0, 30, 60, 0.25);
}

.brand-logo img { height: 26px; display: block; }

.brand-badge {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 6px 12px;
    border-radius: 999px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.brand-copy {
    position: relative;
    z-index: 1;
    animation: fadeUp 0.6s 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-copy h2 {
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
}

.brand-copy p {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    max-width: 330px;
}

.brand-features {
    position: relative;
    z-index: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    padding: 10px 14px;
    border-radius: 12px;
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-features li:nth-child(1) { animation-delay: 0.40s; }
.brand-features li:nth-child(2) { animation-delay: 0.50s; }
.brand-features li:nth-child(3) { animation-delay: 0.60s; }

.brand-features i {
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---------- Form panel ---------- */
.auth-form {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* compact brand header — mobile only */
.mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.mobile-brand .brand-logo { box-shadow: 0 4px 14px rgba(0, 58, 102, 0.15); }
.mobile-brand strong { display: block; font-size: 15px; letter-spacing: -0.01em; color: var(--ink); }
.mobile-brand small { display: block; font-size: 12px; color: var(--muted); }

.auth-form h4 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    color: var(--ink);
}

.auth-form .subtitle {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 28px;
}

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin-bottom: 7px;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    transition: color 0.2s;
}

.input-icon .form-control {
    border-radius: 12px;
    padding: 13px 14px 13px 42px;
    border: 1.5px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    height: auto;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-icon .form-control::placeholder {
    color: #9aa7b5;
    font-weight: 400;
}

/* leave room for the show/hide eye icon so long text doesn't slide under it */
.input-icon .form-control.has-toggle {
    padding-right: 44px;
}

.input-icon .form-control:focus {
    border-color: var(--daikin-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 122, 194, 0.14);
}

.input-icon:focus-within i.lead-icon {
    color: var(--daikin-blue);
}

/* keep autofill looking clean */
.input-icon .form-control:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px #fff inset;
    -webkit-text-fill-color: var(--ink);
    border-radius: 12px;
}

/* higher specificity than ".input-icon i" so the eye icon stays on the right */
.input-icon i.toggle-password {
    left: auto;
    right: 8px;
    cursor: pointer;
    color: var(--muted);
    padding: 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.input-icon i.toggle-password:hover,
.input-icon i.toggle-password:focus-visible {
    color: var(--daikin-blue);
    background: rgba(0, 122, 194, 0.08);
    outline: none;
}

.field-validation-error {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 500;
}

.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0 24px;
}

.form-check-input {
    accent-color: var(--daikin-blue);
    cursor: pointer;
}

.form-check-label {
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
}

.forgot-password-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--daikin-blue);
    text-decoration: none;
    background-image: linear-gradient(var(--daikin-blue), var(--daikin-blue));
    background-size: 0% 1.5px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.25s ease, color 0.2s;
    padding-bottom: 2px;
}

.forgot-password-link:hover {
    color: var(--daikin-blue-dark);
    background-size: 100% 1.5px;
}

/* ---------- Button ---------- */
.btn-daikin {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #0a8fd6 0%, var(--daikin-blue) 45%, var(--daikin-blue-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    width: 100%;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 122, 194, 0.35);
    transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.2s;
}

.btn-daikin:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 122, 194, 0.45);
    filter: brightness(1.05);
    color: #fff;
}

.btn-daikin:active { transform: translateY(0); }

.btn-daikin:disabled {
    cursor: not-allowed;
    opacity: 0.85;
    transform: none;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-daikin.is-loading .btn-spinner { display: inline-block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-footer {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 30px;
}

/* inline success message */
.msg-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: #047857;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.28);
    border-radius: 12px;
}

/* ---------- Toast error alert ---------- */
.custom-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(92vw, 480px);
    background: rgba(220, 53, 69, 0.97);
    color: #fff;
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(180, 30, 45, 0.35);
    z-index: 1050;
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: toastIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.custom-alert i { font-size: 16px; flex-shrink: 0; }

.custom-alert .alert-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    border-radius: 6px;
}

.custom-alert .alert-close:hover { color: #fff; }

.custom-alert.hide {
    opacity: 0;
    transform: translate(-50%, -12px);
    pointer-events: none;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -16px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .auth-card { grid-template-columns: 1fr; max-width: 440px; }
    .auth-brand { display: none; }
    .mobile-brand { display: flex; }
    .auth-form { padding: 36px 28px 30px; }
}

@media (max-width: 420px) {
    .auth-wrapper { padding: 14px; }
    .auth-card { border-radius: 20px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
