/* ELIDZ Skills Portal — Sign in (matches public landing) */

:root {
    --navy-950: #06142b;
    --navy-900: #0b1f3f;
    --navy-800: #12305a;
    --orange-500: #e9812b;
    --orange-600: #d26d18;
    --orange-300: #f7b46c;
    --sand-50: #fbf9f4;
    --sand-100: #f4f1e8;
    --ink: #13233a;
    --muted: #5a6878;
    --line: rgba(19, 35, 58, 0.1);
    --white: #ffffff;
    --font: "Outfit", system-ui, sans-serif;
    --display: "Source Serif 4", Georgia, serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100vh;
    min-height: 100svh;
    font-family: var(--font);
    color: var(--ink);
    background: var(--sand-50);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

:where(a, button, input):focus-visible {
    outline: 3px solid rgba(233, 129, 43, 0.55);
    outline-offset: 3px;
}

/* Loader */
#elidz-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    background: var(--navy-950);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#elidz-loader.hide { opacity: 0; visibility: hidden; }
#elidz-loader .el-dots { display: flex; gap: 8px; }
#elidz-loader .el-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--orange-500);
    animation: el-bounce 0.9s ease-in-out infinite;
}
#elidz-loader .el-dots span:nth-child(2) { animation-delay: 0.15s; background: var(--orange-300); }
#elidz-loader .el-dots span:nth-child(3) { animation-delay: 0.3s; background: var(--white); }
#elidz-loader .el-label {
    font: 600 0.78rem var(--font);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
@keyframes el-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-9px); } }

/* Shell */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    min-height: 100vh;
    min-height: 100svh;
}

/* Left: photo panel */
.info-panel {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 4vw, 3.25rem);
    color: var(--white);
    background: var(--navy-950);
    overflow: hidden;
}
.info-bg { position: absolute; inset: 0; z-index: -2; }
.info-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 65% center; }
.info-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(6, 20, 43, 0.55) 0%, rgba(6, 20, 43, 0.82) 55%, rgba(6, 20, 43, 0.97) 100%),
        radial-gradient(circle at 0% 100%, rgba(233, 129, 43, 0.3), transparent 50%);
}

.info-tag {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.9rem 0.4rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
}
.info-tag-dot {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--orange-500);
    font-size: 0.65rem;
}

.info-body h2 {
    font-family: var(--display);
    font-size: clamp(2.4rem, 4.2vw, 3.6rem);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
    text-wrap: balance;
}
.info-body h2 em { font-style: italic; color: var(--orange-300); }
.info-body p {
    max-width: 42ch;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin-top: 2rem;
}
.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
}
.feature-list .fi {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--orange-300);
    font-size: 0.85rem;
}

.info-footer { margin-top: 2rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.5); }
.info-footer a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.info-footer a:hover { color: var(--orange-300); }

/* Right: form panel */
.form-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(233, 129, 43, 0.08), transparent 30rem),
        var(--sand-50);
}

.form-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 1rem;
    color: var(--navy-900);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.25s var(--ease);
}
.back-btn i { font-size: 0.78rem; transition: transform 0.25s var(--ease); }
.back-btn:hover { border-color: rgba(11, 31, 63, 0.3); }
.back-btn:hover i { transform: translateX(-3px); }

.register-row { font-size: 0.9rem; color: var(--muted); }
.register-row a { color: var(--orange-600); font-weight: 600; text-decoration: none; }
.register-row a:hover { text-decoration: underline; }

.form-center {
    flex: 1;
    display: grid;
    place-items: center;
    padding-block: 2.5rem;
}

.form-card { width: min(100%, 440px); }

.mobile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.25rem;
}
.brand-logo { height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.mobile-header-text {
    padding-left: 0.75rem;
    border-left: 1px solid var(--line);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--navy-900);
    line-height: 1.3;
}

.platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    margin-bottom: 1rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--line);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}
.platform-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2fa36b;
    box-shadow: 0 0 0 3px rgba(47, 163, 107, 0.15);
}

.form-heading {
    font-family: var(--display);
    font-size: clamp(2rem, 3.5vw, 2.6rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--navy-900);
    margin-bottom: 0.5rem;
}
.form-sub { color: var(--muted); font-size: 1rem; margin-bottom: 2rem; }
.form-sub span { color: var(--navy-900); font-weight: 600; }

/* Alerts */
.alert {
    display: none;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    padding: 0.8rem 0.95rem;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    line-height: 1.5;
}
.alert.show { display: flex; }
.alert i { margin-top: 0.2rem; }
.alert-error { color: #a93636; background: #fff3f1; border-color: #f2cbc6; }
.alert-success { color: #256547; background: #effaf3; border-color: #c4e3d1; }
.alert-close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}
.alert-close:hover { opacity: 1; }

/* Fields */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-900);
}
.input-wrap { position: relative; }
.input-wrap .icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8a96a3;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s ease;
}
.form-group input {
    width: 100%;
    min-height: 52px;
    padding: 0.85rem 3rem 0.85rem 2.75rem;
    border: 1px solid rgba(19, 35, 58, 0.16);
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 0.97rem;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input::placeholder { color: #a1abb6; }
.form-group input:focus {
    outline: none;
    border-color: var(--orange-500);
    box-shadow: 0 0 0 4px rgba(233, 129, 43, 0.15);
}
.input-wrap:focus-within .icon { color: var(--orange-600); }
.form-group input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 100px var(--white) inset;
    -webkit-text-fill-color: var(--ink);
}

.pw-toggle {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8a96a3;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.pw-toggle:hover { color: var(--navy-900); background: var(--sand-100); }

.row-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.remember {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}
.remember input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--orange-500); cursor: pointer; }
.forgot-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--orange-600);
    text-decoration: none;
    white-space: nowrap;
}
.forgot-link:hover { text-decoration: underline; }

/* Buttons */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 54px;
    margin-bottom: 1.25rem;
    border: 0;
    border-radius: 999px;
    background: var(--orange-500);
    color: var(--white);
    font: 600 1rem var(--font);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(233, 129, 43, 0.28);
    transition: transform 0.25s var(--ease), background 0.25s ease, box-shadow 0.25s ease;
}
.btn-submit:hover { background: var(--orange-600); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(233, 129, 43, 0.34); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    color: #98a3ae;
    font-size: 0.8rem;
}
.divider::before,
.divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(11, 31, 63, 0.18);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy-900);
    font: 600 0.95rem var(--font);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.25s var(--ease);
}
.btn-ghost:hover { border-color: var(--navy-900); transform: translateY(-2px); }

#resendVerifyRow { margin-top: 1rem; text-align: center; }

.footer-note {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.7;
    color: #8a96a3;
}
.footer-note a { color: var(--muted); text-decoration: none; }
.footer-note a:hover { color: var(--orange-600); }

/* Forgot password modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(6, 20, 43, 0.5);
    backdrop-filter: blur(6px);
}
.modal-overlay.show { display: flex; }
.modal-box {
    position: relative;
    width: min(100%, 440px);
    padding: 2.25rem;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 30px 70px rgba(6, 20, 43, 0.3);
    animation: popIn 0.3s var(--ease);
}
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.modal-handle { display: none; }
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--sand-100);
    color: var(--muted);
    font-size: 1.1rem;
    cursor: pointer;
}
.modal-close:hover { color: var(--navy-900); }
.modal-title {
    font-family: var(--display);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--navy-900);
    margin-bottom: 0.3rem;
}
.modal-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.modal-box .btn-submit { margin-bottom: 0; }

/* Responsive */
@media (max-width: 960px) {
    .auth-shell { grid-template-columns: 1fr; }
    .info-panel { display: none; }
}

@media (max-width: 520px) {
    .form-panel { padding: 1rem 1rem 1.5rem; }
    .form-topbar .register-row span { display: none; }
    .form-center { place-items: start center; padding-block: 2rem 1rem; }
    .brand-logo { height: 38px; }
    .mobile-header { margin-bottom: 1.75rem; }

    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal-box { width: 100%; padding: 1.5rem 1.25rem 2rem; border-radius: 24px 24px 0 0; }
    .modal-handle { display: block; width: 40px; height: 4px; margin: 0 auto 1.25rem; border-radius: 2px; background: var(--line); }
}

@media (max-width: 360px) {
    .row-inline { flex-direction: column; align-items: flex-start; }
}

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