* {
    box-sizing: border-box;
}

:root {
    --primary: #174ea6;
    --primary-hover: #103b7f;
    --ink: #152033;
    --muted: #65758b;
    --line: #dce5ef;
    --surface: #ffffff;
    --surface-soft: #f7f9fc;
    --success: #148c72;
    --warning: #d97706;
    --danger: #c2413a;
    --shadow: 0 24px 70px rgba(28, 45, 76, 0.15);
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
}

body.login-bg {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 18% 18%, rgba(20, 140, 114, 0.13), transparent 30%),
        radial-gradient(circle at 86% 12%, rgba(23, 78, 166, 0.12), transparent 28%),
        linear-gradient(135deg, #f8fafc 0%, #edf3f8 48%, #f7f9fc 100%);
}

a {
    color: inherit;
}

.login-header {
    width: 100%;
    padding: 18px clamp(18px, 5vw, 56px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #174ea6, #148c72);
    color: #fff;
    box-shadow: 0 12px 26px rgba(23, 78, 166, 0.22);
}

.logo-text {
    font-size: 1rem;
    letter-spacing: 0;
}

.back-link,
.back-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(101, 117, 139, 0.24);
    border-radius: 999px;
    color: #34435a;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.back-link:hover,
.back-home:hover {
    transform: translateY(-1px);
    border-color: rgba(23, 78, 166, 0.34);
    background: #fff;
}

.login-wrapper,
.login-main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px clamp(16px, 4vw, 40px) 42px;
    gap: 22px;
}

.login-container {
    width: min(100%, 1040px);
    display: grid;
    grid-template-columns: minmax(300px, 0.95fr) minmax(320px, 1fr);
    overflow: hidden;
    border: 1px solid rgba(125, 140, 160, 0.24);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-illustration {
    position: relative;
    min-height: 560px;
    padding: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(21, 32, 51, 0.97), rgba(27, 68, 116, 0.94)),
        #152033;
}

.login-illustration::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
}

.status-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 330px);
    padding: 24px;
    border-radius: 22px;
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.panel-topline {
    display: flex;
    gap: 8px;
    margin-bottom: 34px;
}

.panel-topline span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.34);
}

.route-map {
    display: grid;
    grid-template-columns: 18px 1fr 18px 0.65fr 18px;
    align-items: center;
    margin-bottom: 34px;
}

.route-node {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.36);
    background: #fff;
}

.node-mid {
    background: #f7b731;
}

.node-end {
    background: #20c997;
}

.route-line {
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), #20c997);
}

.route-line-short {
    background: linear-gradient(90deg, #f7b731, rgba(255, 255, 255, 0.5));
}

.metric-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.metric-row strong {
    font-size: 3.2rem;
    line-height: 1;
}

.metric-row span {
    max-width: 120px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.progress-card {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.13);
}

.progress-card span {
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.86rem;
    font-weight: 700;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.progress-track div {
    width: 76%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #20c997, #f7b731);
}

.insight-card {
    position: absolute;
    z-index: 2;
    right: 30px;
    bottom: 56px;
    max-width: 250px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.insight-card strong,
.insight-card small {
    display: block;
}

.insight-card small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.68);
}

.insight-dot {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #20c997;
    box-shadow: 0 0 0 6px rgba(32, 201, 151, 0.14);
}

.login-form-section {
    padding: clamp(32px, 6vw, 58px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
}

.form-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eyebrow {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #edf7f4;
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.form-header h1,
.login-title {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.02;
    font-weight: 850;
}

.form-header p,
.login-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.55;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 0.94rem;
    font-weight: 700;
}

.alert-error {
    color: #8f2721;
    background: #fff1ef;
    border: 1px solid rgba(194, 65, 58, 0.2);
}

.alert-icon {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: var(--danger);
    font-size: 0.78rem;
    font-weight: 900;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #263449;
    font-size: 0.92rem;
    font-weight: 800;
}

.form-input,
.form-group input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: var(--surface-soft);
    outline: none;
    font: inherit;
    font-weight: 650;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-input::placeholder,
.form-group input::placeholder {
    color: #9aa7b8;
    font-weight: 500;
}

.form-input:focus,
.form-group input:focus {
    border-color: rgba(23, 78, 166, 0.62);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(23, 78, 166, 0.11);
}

.form-hint,
.field-hint,
.form-guide {
    color: var(--muted);
    font-size: 0.84rem;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 88px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 64px;
    height: 36px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    color: var(--primary);
    background: #eaf1fb;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 850;
    transition: background 0.2s ease, color 0.2s ease;
}

.toggle-password:hover {
    color: #fff;
    background: var(--primary);
}

.btn-login {
    min-height: 54px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #148c72);
    box-shadow: 0 14px 26px rgba(23, 78, 166, 0.24);
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-login:hover:not(:disabled),
.btn-login:focus-visible:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(23, 78, 166, 0.28);
    filter: saturate(1.08);
}

.btn-login:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.btn-arrow {
    font-size: 1.2rem;
}

.form-footer,
.login-links {
    padding-top: 18px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.form-footer p,
.login-links p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.link-signup,
.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 850;
}

.link-signup:hover,
.login-links a:hover {
    text-decoration: underline;
}

.login-benefits {
    width: min(100%, 1040px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.benefit {
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(125, 140, 160, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: #304055;
    font-weight: 750;
}

.benefit-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    color: var(--primary);
    background: #eaf1fb;
    font-size: 0.76rem;
    font-weight: 900;
}

@media (max-width: 820px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .login-illustration {
        min-height: 300px;
        padding: 28px;
    }

    .status-panel {
        width: min(100%, 360px);
    }

    .insight-card {
        right: 22px;
        bottom: 24px;
    }

    .login-benefits {
        max-width: 560px;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .login-header {
        padding: 14px 16px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
    }

    .back-link,
    .back-home {
        min-height: 36px;
        padding: 0 11px;
        font-size: 0.84rem;
    }

    .login-wrapper,
    .login-main {
        justify-content: flex-start;
        padding: 12px 12px 28px;
    }

    .login-container {
        border-radius: 22px;
    }

    .login-illustration {
        min-height: 230px;
        padding: 20px;
    }

    .login-illustration::before,
    .insight-card {
        display: none;
    }

    .status-panel {
        padding: 18px;
    }

    .panel-topline,
    .route-map {
        margin-bottom: 22px;
    }

    .metric-row strong {
        font-size: 2.4rem;
    }

    .login-form-section {
        padding: 26px 18px 24px;
        gap: 20px;
    }

    .form-header h1,
    .login-title {
        font-size: 2rem;
    }

    .form-input,
    .form-group input,
    .btn-login {
        min-height: 50px;
    }

    .benefit {
        min-height: 56px;
    }
}
