/* ============================================================
   login-modern.css
   Login-only visual layer for TCPMS HUB.
   Loaded AFTER login.css + forgot-password.css on the login page.
   Uses ONLY the existing palette variables from login.css
   (navy, navy-mid, indigo, indigo-hover, indigo-soft, sky, surface,
   border, text-*) — no new brand colors are introduced.
   ============================================================ */

/* ============================================================
   LEFT PANEL — academic story layout
   ============================================================ */

.login-panel {
    align-items: stretch;
    justify-content: flex-start;
    gap: clamp(14px, 2.2vh, 26px);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(21, 145, 220, 0.10) 0%, rgba(21, 145, 220, 0) 55%),
        radial-gradient(90% 70% at 100% 100%, rgba(26, 58, 107, 0.08) 0%, rgba(26, 58, 107, 0) 60%),
        #f0f6ff;
}

/* Soften the dot grid so the content reads first */
.login-panel::before {
    opacity: .55;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 100%);
            mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 100%);
}

/* Intro headline */
.panel-intro {
    position: relative;
    z-index: 1;
    max-width: 560px;
    animation: lm-fade-up .6s ease both;
}

.panel-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px 5px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(21, 145, 220, 0.22);
    color: var(--indigo);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .9px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(13, 60, 130, 0.08);
}

.panel-eyebrow i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--indigo-soft);
    font-size: .8rem;
}

.panel-title {
    margin-top: 14px;
    color: var(--navy);
    font-size: clamp(1.35rem, 2.05vw, 2rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.6px;
}

.panel-highlight {
    color: var(--indigo);
    background: linear-gradient(180deg, transparent 62%, var(--indigo-soft) 62%);
    padding: 0 2px;
    border-radius: 2px;
}

.panel-subtitle {
    margin-top: 10px;
    max-width: 470px;
    color: var(--text-muted);
    font-size: clamp(.82rem, .95vw, .92rem);
    line-height: 1.6;
}

/* Illustration area + floating milestone cards */
.panel-illustration-area {
    padding: clamp(4px, 1vh, 14px) 0;
}

.panel-illustration-img {
    max-width: 78%;
}

.panel-float-card {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px 9px 9px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(21, 145, 220, 0.18);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(13, 60, 130, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: lm-float 6s ease-in-out infinite;
    white-space: nowrap;
}

.float-a { top: 10%;  left: 0;    animation-delay: 0s; }
.float-b { top: 42%;  right: 0;   animation-delay: -2s; }
.float-c { bottom: 8%; left: 6%;  animation-delay: -4s; }

.float-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--indigo-soft);
    color: var(--indigo);
    font-size: 1.05rem;
}

.float-icon.is-success { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.float-icon.is-warn    { background: rgba(245, 158, 11, 0.14); color: var(--warn); }

.float-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.float-text strong {
    color: var(--navy);
    font-size: .74rem;
    font-weight: 700;
}

.float-text small {
    color: var(--text-muted);
    font-size: .64rem;
    font-weight: 500;
}

/* Project journey card */
.panel-journey {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(21, 145, 220, 0.20);
    border-radius: var(--r-lg);
    padding: clamp(14px, 2vh, 20px) clamp(16px, 2.2vw, 26px);
    box-shadow: 0 10px 30px rgba(13, 60, 130, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: lm-fade-up .6s .15s ease both;
}

.journey-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.journey-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--navy);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.journey-title i { color: var(--indigo); font-size: 1rem; }

.journey-count {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--indigo-soft);
    color: var(--indigo);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.journey-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: relative;
}

/* Connector line behind the dots */
.journey-steps::before {
    content: '';
    position: absolute;
    top: 17px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--sky-start) 0%, var(--indigo) 60%, var(--navy) 100%);
    border-radius: 2px;
    z-index: 0;
}

.journey-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.journey-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid var(--indigo);
    color: var(--indigo);
    font-size: 1rem;
    box-shadow: 0 0 0 4px #fff, 0 4px 10px rgba(21, 145, 220, 0.22);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

.journey-step:hover .journey-dot {
    transform: translateY(-2px);
    background: var(--indigo);
    color: #fff;
}

.journey-step.is-summit .journey-dot {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--navy) 100%);
    border-color: var(--navy);
    color: #fff;
}

.journey-name {
    margin-top: 7px;
    color: var(--navy);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.journey-desc {
    color: var(--text-light);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.journey-quote {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: clamp(.76rem, .86vw, .84rem);
    font-style: italic;
    line-height: 1.6;
    text-align: center;
}

.journey-quote i {
    color: var(--indigo);
    font-size: 1rem;
    vertical-align: -2px;
    margin-right: 2px;
}

.journey-quote strong {
    color: var(--navy);
    font-style: normal;
    font-weight: 700;
}

/* ============================================================
   RIGHT SIDE — form area
   ============================================================ */

/* Faint "graph paper" grid over the existing sky gradient */
.login-form-side {
    gap: 18px;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(160deg, #a8d8f0 0%, #68b8e8 35%, #3aa0d8 70%, #2490cc 100%);
    background-size: 32px 32px, 32px 32px, auto;
}

.login-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    animation: lm-fade-up .55s ease both;
}

/* Re-enable the accent bar with the existing palette */
.login-card-top-accent {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--sky-start) 0%, var(--indigo) 50%, var(--navy) 100%);
}

.header-icon-wrap {
    padding-bottom: 16px;
    border-bottom: 1px solid #eaf3fb;
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--indigo-soft);
    color: var(--indigo);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.login-eyebrow i { font-size: .85rem; }

/* Inputs — icon reacts to focus */
.input-icon { transition: color .2s ease; }

.input-wrap:focus-within .input-icon { color: var(--indigo); }

.form-input {
    border-radius: 10px;
}

.form-input:hover:not(:focus) {
    border-color: #a9cdea;
}

/* Primary button — same indigo → navy-mid palette, with arrow motion */
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo) 0%, var(--navy-mid) 100%);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--indigo-hover) 0%, var(--navy) 100%);
    transform: translateY(-1px);
}

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

.btn-login:disabled,
.btn-login:disabled:hover {
    background: linear-gradient(135deg, var(--indigo) 0%, var(--navy-mid) 100%);
    transform: none;
}

.btn-login:disabled:hover .btn-login-arrow { transform: none; }

.btn-login-arrow {
    font-size: 1rem;
    transition: transform .2s ease;
}

.btn-login:hover .btn-login-arrow { transform: translateX(4px); }

.btn-login:focus-visible,
.forgot-link:focus-visible,
.input-action-icon:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: 2px;
}

/* Who-uses-the-portal chips */
.login-roles .sso-divider {
    margin: 22px 0 12px;
}

.roles-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.roles-chips li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.4;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.roles-chips li i {
    color: var(--indigo);
    font-size: .85rem;
}

.roles-chips li:hover {
    border-color: var(--indigo);
    background: #fff;
    color: var(--navy);
}

/* Footer under the card */
.login-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: .72rem;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 1px 2px rgba(13, 60, 120, 0.25);
}

.login-footer span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.login-footer-sep { opacity: .6; }

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes lm-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lm-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Large desktops — keep panel content centered and readable */
@media (min-width: 1600px) {
    .login-panel { align-items: stretch; }
    .panel-intro,
    .panel-journey {
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
    .panel-brand-header {
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
    }
}

/* Compact laptops — narrower panel: lighten the illustration overlays */
@media (min-width: 993px) and (max-width: 1199px) {
    .panel-float-card { padding: 7px 11px 7px 7px; gap: 8px; }
    .float-icon { width: 28px; height: 28px; font-size: .95rem; }
    .float-c { display: none; }
    .panel-illustration-img { max-width: 84%; }
    .journey-name { font-size: .66rem; }
    .journey-desc { font-size: .56rem; }
    .journey-dot { width: 32px; height: 32px; font-size: .9rem; }
    .journey-steps::before { top: 15px; }
}

/* Short-height laptops (1366×768, 1280×720) */
@media (min-width: 993px) and (max-height: 820px) {
    .login-panel { gap: 12px; }
    .panel-subtitle { display: none; }
    .panel-title { margin-top: 10px; font-size: clamp(1.25rem, 1.8vw, 1.6rem); }
    .journey-quote { display: none; }
    .panel-journey { padding: 12px 18px; }
    .journey-head { margin-bottom: 8px; }
    .float-c { display: none; }
}

@media (min-width: 993px) and (max-height: 700px) {
    .login-roles { display: none; }
    .panel-float-card { display: none; }
}

/* Tablets & phones — left panel is hidden by login.css */
@media (max-width: 992px) {
    .login-form-side { gap: 16px; }
}

@media (max-width: 640px) {
    .roles-chips li { font-size: .66rem; padding: 3px 9px; }
    .login-footer { font-size: .68rem; }
}

@media (max-width: 380px) {
    .roles-chips { gap: 5px; }
    .roles-chips li i { display: none; }
    .login-footer-sep { display: none; }
}

/* Phone landscape — save vertical space */
@media (max-width: 992px) and (max-height: 580px) and (orientation: landscape) {
    .login-roles { display: none; }
    .header-icon-wrap { padding-bottom: 10px; }
    .login-eyebrow { margin-bottom: 4px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .panel-intro,
    .panel-journey,
    .login-card,
    .panel-float-card {
        animation: none;
    }
    .btn-login-arrow,
    .journey-dot,
    .roles-chips li {
        transition: none;
    }
}
