/* ============================================
 * login.css - Bi'S MART LMS premium login screen
 * Visual-only layer. Keep login IDs and actions intact.
 * ============================================ */

.login-layout {
    --login-orange: #ff5a1f;
    --login-orange-deep: #ef3f18;
    --login-peach: #ffb083;
    --login-mint: #20b486;
    --login-mint-soft: #dff7ef;
    --login-mint-pale: #edf9f5;
    --login-ink: #071426;
    --login-muted: #667085;
    --login-line: rgba(198, 208, 221, 0.72);
    --login-shadow: 0 32px 90px rgba(15, 23, 42, 0.16);
    --login-display: var(--font-display, 'iCiel VAG Rounded Next', 'Roboto', Arial, sans-serif);
    --login-body: var(--font-body, 'Roboto', Arial, sans-serif);

    min-height: 100vh;
    min-height: 100dvh;
    width: 100vw;
    display: grid !important;
    grid-template-columns: minmax(0, 1.45fr) minmax(520px, 0.95fr);
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at 93% 86%, rgba(32, 180, 134, 0.18) 0 16%, transparent 34%),
        linear-gradient(90deg, #fff7f0 0%, #ffffff 57%, #ffffff 100%);
    color: var(--login-ink);
    font-family: var(--login-body) !important;
}

.login-layout :where(:not(i):not([class*="fa-"])) {
    font-family: inherit;
}

.login-layout.hidden {
    display: none !important;
}

.login__brand {
    position: relative;
    min-width: 0;
    min-height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: clamp(24px, 2.2vw, 40px) clamp(32px, 4.8vw, 80px);
    overflow: hidden;
    isolation: isolate;
    clip-path: polygon(0 0, 96% 0, 84.5% 100%, 0 100%);
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 231, 199, 0.88) 0 11%, transparent 25%),
        radial-gradient(circle at 61% 38%, rgba(255, 255, 255, 0.44) 0 5%, transparent 23%),
        radial-gradient(circle at 78% 52%, rgba(32, 180, 134, 0.3) 0 10%, transparent 28%),
        linear-gradient(138deg, #ff6928 0%, #ff8a55 34%, #ffd0b0 61%, rgba(32, 180, 134, 0.48) 100%);
}

.login__brand::before,
.login__brand::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.login__brand::before {
    inset: 0;
    opacity: 0.45;
    background:
        linear-gradient(112deg, transparent 0 42%, rgba(255, 255, 255, 0.32) 44%, transparent 47% 100%),
        linear-gradient(114deg, transparent 0 55%, rgba(255, 255, 255, 0.18) 56%, transparent 58% 100%),
        radial-gradient(circle at 42% 19%, rgba(255, 255, 255, 0.95) 0 1px, transparent 3px),
        radial-gradient(circle at 61% 3%, rgba(255, 255, 255, 0.75) 0 1px, transparent 3px),
        radial-gradient(circle at 76% 36%, rgba(255, 255, 255, 0.82) 0 1px, transparent 3px);
}

.login__brand::after {
    width: 900px;
    height: 680px;
    right: 4%;
    top: 19%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-left-color: transparent;
    border-bottom-color: transparent;
    transform: rotate(-17deg);
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.38));
}

.login__brand-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.28;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.72) 1px, transparent 0),
        repeating-linear-gradient(108deg, transparent 0 70px, rgba(255, 255, 255, 0.11) 71px, transparent 73px);
    background-size: 36px 36px, 210px 210px;
}

.login__brand-curve {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
}

.login__brand-curve--top {
    width: 980px;
    height: 640px;
    right: -80px;
    top: -170px;
    transform: rotate(-16deg);
}

.login__brand-curve--bottom {
    width: 1050px;
    height: 720px;
    left: -260px;
    bottom: -490px;
    transform: rotate(10deg);
}

.login__orb,
.login__form-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.login__orb--mint {
    z-index: 0;
    width: 430px;
    height: 430px;
    right: 7%;
    top: 34%;
    background: radial-gradient(circle, rgba(223, 247, 239, 0.72), rgba(32, 180, 134, 0.18) 58%, transparent 72%);
    filter: blur(1px);
}

.login__orb--orange {
    z-index: 0;
    width: 300px;
    height: 300px;
    left: -60px;
    top: 8%;
    background: rgba(255, 255, 255, 0.2);
}

.login__brand-content {
    position: relative;
    z-index: 3;
    width: min(760px, 84%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.login__brand-logo {
    width: clamp(168px, 11.6vw, 204px);
    height: clamp(84px, 6.1vw, 108px);
    object-fit: cover;
    object-position: center;
    margin: 0 0 clamp(18px, 2.2vw, 30px);
    filter:
        drop-shadow(0 5px 0 rgba(255, 255, 255, 0.34))
        drop-shadow(0 18px 34px rgba(180, 60, 24, 0.2));
}

.login__brand-title,
.login__title,
.login__brand-kicker,
.login__mobile-badge,
.login__feature-pill span,
.login__community-title-row strong,
.login__metric-card strong,
.login__metric-card span,
.login__label,
.login__btn-text,
.login__modal-title,
.login__modal-btn {
    font-family: var(--login-display) !important;
}

.login__brand-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.15rem, 3.75vw, 3.95rem);
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: 0.006em;
    text-shadow:
        0 2px 0 rgba(255, 255, 255, 0.55),
        0 8px 18px rgba(184, 68, 28, 0.34),
        0 0 22px rgba(255, 255, 255, 0.54);
}

.login__brand-title-line,
.login__brand-wordmark {
    display: block;
}

.login__brand-wordmark {
    margin-top: 6px;
    font-size: clamp(4.35rem, 6.65vw, 7.1rem);
    line-height: 0.94;
    font-weight: 900;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.16);
    white-space: nowrap;
    -webkit-text-stroke: clamp(1px, 0.16vw, 3px) rgba(255, 255, 255, 0.92);
    text-shadow:
        0 3px 0 rgba(255, 255, 255, 0.68),
        0 13px 28px rgba(169, 59, 20, 0.32),
        0 0 34px rgba(255, 255, 255, 0.78);
}

.login__brand-subtitle {
    width: min(610px, 100%);
    margin: clamp(16px, 1.8vw, 22px) 0 0;
    color: rgba(7, 20, 38, 0.76);
    font-size: clamp(0.92rem, 1.08vw, 1.06rem);
    line-height: 1.55;
    font-weight: 500;
}

.login__feature-grid {
    width: min(590px, 100%);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(10px, 1.1vw, 16px);
    margin-top: clamp(17px, 1.8vw, 24px);
}

.login__feature-pill {
    min-height: clamp(78px, 7vw, 91px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 16px 38px rgba(107, 53, 32, 0.1);
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
}

.login__feature-pill i {
    font-size: clamp(1.18rem, 1.5vw, 1.45rem);
}

.login__feature-pill:nth-child(1) i,
.login__feature-pill:nth-child(3) i {
    color: var(--login-orange);
}

.login__feature-pill:nth-child(2) i,
.login__feature-pill:nth-child(4) i {
    color: var(--login-mint);
}

.login__feature-pill span {
    color: var(--login-ink);
    font-size: clamp(0.76rem, 0.86vw, 0.86rem);
    font-weight: 900;
    white-space: nowrap;
}

.login__community-panel {
    width: min(700px, 100%);
    margin-top: clamp(16px, 1.8vw, 22px);
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(250px, 0.95fr) minmax(300px, 1.05fr);
    gap: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.76);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 22px 58px rgba(103, 52, 32, 0.12);
    backdrop-filter: blur(24px) saturate(176%);
    -webkit-backdrop-filter: blur(24px) saturate(176%);
}

.login__community-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login__community-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login__community-icon {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.45rem;
    background: linear-gradient(135deg, #ff8a35, var(--login-orange-deep));
    box-shadow: 0 16px 34px rgba(255, 90, 31, 0.3);
}

.login__community-title-row strong {
    color: var(--login-ink);
    font-size: clamp(1.2rem, 1.55vw, 1.55rem);
    line-height: 1.18;
    font-weight: 900;
}

.login__metric-card {
    min-height: 104px;
    display: grid;
    grid-template-columns: 70px 1fr 26px;
    align-items: center;
    gap: 14px;
    padding: 17px 20px;
    border-radius: 16px;
    background: rgba(245, 255, 251, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.login__metric-icon {
    width: 62px;
    height: 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    background: linear-gradient(145deg, #6bd7a4, #20b486);
    box-shadow: 0 17px 30px rgba(32, 180, 134, 0.28);
}

.login__metric-card strong {
    display: block;
    color: var(--login-orange);
    font-size: clamp(1.85rem, 2.55vw, 2.6rem);
    line-height: 1;
    font-weight: 900;
}

.login__metric-card--social strong {
    font-size: clamp(1.5rem, 1.95vw, 2.05rem);
}

.login__metric-card--social {
    position: relative;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
}

.login__metric-card--social .login__metric-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(145deg, #76dfba, #18b993);
}

.login__metric-card--social .login__metric-sparkle {
    position: absolute;
    right: 17px;
    top: 17px;
    color: #18b993;
}

.login__metric-card span,
.login__metric-card small {
    display: block;
    color: var(--login-ink);
}

.login__metric-card span {
    margin-top: 6px;
    font-size: 1rem;
    font-weight: 900;
}

.login__metric-card small {
    margin-top: 2px;
    color: #4c596b;
    font-size: 0.95rem;
    font-weight: 500;
}

.login__metric-sparkle {
    color: #ff9a44;
    font-size: 1.16rem;
}

.login__post-card {
    min-width: 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.login__post-head {
    display: grid;
    grid-template-columns: 42px 1fr 18px;
    align-items: center;
    gap: 10px;
}

.login__avatar-mini {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--login-orange);
    background: linear-gradient(135deg, #fff1e8, #ffffff);
    border: 1px solid rgba(255, 255, 255, 0.86);
}

.login__post-head strong,
.login__post-head small,
.login__post-title,
.login__post-card p {
    display: block;
}

.login__post-head strong {
    color: var(--login-ink);
    font-size: 0.78rem;
    font-weight: 900;
}

.login__post-head small {
    margin-top: 2px;
    color: #768195;
    font-size: 0.72rem;
    font-weight: 500;
}

.login__post-head .fa-ellipsis {
    color: #99a2b3;
    font-size: 0.86rem;
}

.login__post-title {
    margin-top: 14px;
    color: var(--login-ink);
    font-size: 0.86rem;
    font-weight: 900;
}

.login__post-card p {
    margin: 5px 0 10px;
    color: #344054;
    font-size: 0.78rem;
    line-height: 1.35;
    font-weight: 500;
}

.login__post-photo {
    min-height: 78px;
    overflow: hidden;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.04)),
        url('../assets/login-community-photo.png') center / cover no-repeat;
}

.login__post-photo span {
    display: none;
}

.login__post-actions {
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 24px;
    color: #667085;
    font-size: 0.76rem;
    font-weight: 700;
}

.login__post-actions span:last-child {
    margin-left: auto;
}

.login__post-actions .fa-heart {
    color: #ff6b6b;
}

.login__post-actions .fa-comment,
.login__post-actions .fa-bookmark {
    color: #718096;
}

.login__form-wrapper {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(72px, 7vw, 120px) clamp(44px, 5.7vw, 96px) clamp(34px, 5vw, 70px) 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 88%, rgba(32, 180, 134, 0.16) 0 18%, transparent 37%),
        radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.72) 0 13%, transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), #ffffff);
}

.login__form-wrapper::before {
    content: "";
    position: absolute;
    width: 680px;
    height: 680px;
    right: -310px;
    bottom: -340px;
    border-radius: 50%;
    border: 1px solid rgba(32, 180, 134, 0.18);
    box-shadow: inset 0 0 0 44px rgba(32, 180, 134, 0.055);
    pointer-events: none;
}

.login__form-orb--top {
    width: 180px;
    height: 180px;
    top: 3%;
    right: 8%;
    background: rgba(32, 180, 134, 0.06);
}

.login__form-orb--bottom {
    width: 300px;
    height: 300px;
    right: -80px;
    bottom: -90px;
    background: rgba(32, 180, 134, 0.08);
}

.login__card {
    position: relative;
    z-index: 2;
    width: min(510px, 100%);
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    padding: clamp(38px, 4.1vw, 54px) clamp(36px, 4.1vw, 48px);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow: var(--login-shadow);
    backdrop-filter: blur(28px) saturate(170%);
    -webkit-backdrop-filter: blur(28px) saturate(170%);
    transform: translateY(-14px);
}

.login__card::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), transparent 42%),
        radial-gradient(circle at 8% 0%, rgba(255, 245, 237, 0.62), transparent 34%);
}

.login__card::after {
    content: "";
    position: absolute;
    top: 35px;
    right: 78px;
    width: 82px;
    height: 82px;
    opacity: 0.42;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(32, 180, 134, 0.56) 1px, transparent 1.8px);
    background-size: 14px 14px;
}

.login__header,
.login__form {
    position: relative;
    z-index: 1;
}

.login__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.login__logo-mobile {
    display: none;
}

.login__mobile-badge {
    display: block;
    width: min(278px, 82vw);
    height: clamp(50px, 4.7vw, 64px);
    padding: 0;
    margin: 5px auto 22px;
    overflow: visible;
}

.login__welcome-script {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter:
        drop-shadow(0 1px 1px rgba(255, 255, 255, 0.72))
        drop-shadow(0 8px 15px rgba(32, 180, 134, 0.22));
}

.login__welcome-script text {
    font-family: "Segoe Print", "Bradley Hand", "Apple Chancery", "Comic Sans MS", cursive;
    font-size: 48px;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.login__welcome-script-stroke {
    fill: none;
    stroke: var(--login-mint);
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 780;
    stroke-dashoffset: 780;
    animation: login-welcome-stroke 7s ease-in-out 0.25s infinite;
}

.login__welcome-script-fill {
    fill: var(--login-mint);
    opacity: 0;
    animation: login-welcome-fill 7s ease-in-out 0.25s infinite;
}

.login__title {
    margin: 0;
    color: var(--login-ink);
    font-size: clamp(2.2rem, 2.85vw, 2.9rem);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.045em;
}

.login__title-orange {
    color: var(--login-orange);
}

.login__subtitle {
    display: none;
}

.login__form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login__form-group {
    display: flex;
    flex-direction: column;
}

.login__label {
    margin-bottom: 14px;
    color: var(--login-ink);
    font-family: var(--login-body) !important;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login__input-icon {
    position: absolute;
    left: 20px;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a7b0c1;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.login__input {
    width: 100%;
    height: 62px;
    box-sizing: border-box;
    padding: 0 22px 0 58px !important;
    color: var(--login-ink);
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--login-line);
    border-radius: 12px;
    outline: none;
    font-size: 1rem;
    font-weight: 600;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.login__input--password {
    padding-right: 58px !important;
}

.login__input::placeholder {
    color: #99a2b3;
    font-weight: 500;
}

.login__input:hover {
    border-color: rgba(32, 180, 134, 0.42);
    background: #fff;
}

.login__input:focus {
    border-color: var(--login-orange);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.12), 0 12px 28px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.login__input:focus ~ .login__input-icon,
.login__input:not(:placeholder-shown) ~ .login__input-icon {
    color: var(--login-orange);
    transform: scale(1.03);
}

.login__btn-toggle-pass {
    position: absolute;
    right: 15px;
    z-index: 3;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    color: #95a0b2;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.login__btn-toggle-pass:hover,
.login__btn-toggle-pass:focus-visible {
    color: var(--login-orange);
    background: rgba(255, 90, 31, 0.08);
    outline: none;
}

.login__btn-toggle-pass:active {
    transform: scale(0.95);
}

.login__error {
    color: #b42318;
    background: rgba(254, 242, 242, 0.96);
    border: 1px solid rgba(252, 165, 165, 0.82);
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.45;
    text-align: left;
}

.login__support {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: -2px 0 18px;
    font-size: 0.88rem;
    font-weight: 800;
}

.login__link {
    color: #667085;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.login__link:hover {
    color: var(--login-orange);
}

.login__link--zalo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--login-mint);
}

.login__link--zalo:hover {
    color: var(--login-orange);
}

.login__btn {
    position: relative;
    width: 100%;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    overflow: hidden;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, #ff701d 0%, #ff5a1f 48%, #ff3d17 100%);
    box-shadow: 0 18px 34px rgba(255, 90, 31, 0.3);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.login__btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.32) 45%, transparent 62%);
    transform: translateX(-120%);
    transition: transform 0.55s ease;
}

.login__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(255, 90, 31, 0.34);
    filter: saturate(1.04);
}

.login__btn:hover::before {
    transform: translateX(120%);
}

.login__btn:active {
    transform: translateY(0);
    box-shadow: 0 12px 24px rgba(255, 90, 31, 0.22);
}

.login__btn-text,
.login__btn-arrow {
    position: relative;
    z-index: 1;
}

.login__btn-text {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.login__btn-arrow {
    font-size: 1.55rem;
    line-height: 1;
    transform: translateY(-1px);
}

.login__spinner {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login__spinner-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #ffffff;
    animation: login-spin 1s linear infinite;
}

.login__spinner-icon-circle {
    opacity: 0.25;
}

.login__spinner-icon-path {
    opacity: 0.8;
}

@keyframes login-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes login-welcome-stroke {
    0%, 8% {
        stroke-dashoffset: 780;
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    56%, 78% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    92%, 100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

@keyframes login-welcome-fill {
    0%, 42% {
        opacity: 0;
    }

    58%, 78% {
        opacity: 1;
    }

    92%, 100% {
        opacity: 0;
    }
}

.login__modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(7, 20, 38, 0.46);
    backdrop-filter: blur(10px) saturate(170%);
    -webkit-backdrop-filter: blur(10px) saturate(170%);
}

.login__modal-content {
    width: min(390px, 100%);
    box-sizing: border-box;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: 0 26px 70px rgba(7, 20, 38, 0.22);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
}

.login__modal-icon-wrapper {
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    color: var(--login-orange);
    background: linear-gradient(135deg, #fff0e7, var(--login-mint-pale));
}

.login__modal-icon {
    font-size: 1.45rem;
}

.login__modal-title {
    margin: 0 0 10px;
    color: var(--login-ink);
    font-size: 1.3rem;
    font-weight: 900;
}

.login__modal-text {
    margin: 0 0 24px;
    color: var(--login-muted);
    font-size: 0.95rem;
    line-height: 1.68;
    font-weight: 500;
}

.login__modal-text-highlight {
    color: var(--login-orange);
    font-size: 1.08rem;
    font-weight: 900;
}

.login__modal-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    color: var(--login-ink);
    background: #f6f7f9;
    font-size: 0.96rem;
    font-weight: 900;
    transition: background 0.2s ease, transform 0.2s ease;
}

.login__modal-btn:hover {
    background: #e9ecf0;
}

.login__modal-btn:active {
    transform: scale(0.98);
}

@media (max-width: 1380px) {
    .login-layout {
        grid-template-columns: minmax(0, 1.36fr) minmax(490px, 0.94fr);
    }

    .login__brand-content {
        width: min(690px, 86%);
    }

    .login__community-panel {
        width: min(660px, 100%);
        grid-template-columns: minmax(225px, 0.9fr) minmax(285px, 1.1fr);
    }
}

@media (max-width: 1180px) {
    .login-layout {
        grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
    }

    .login__brand {
        padding-inline: 38px;
    }

    .login__brand-content {
        width: min(590px, 92%);
    }

    .login__feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login__community-panel {
        grid-template-columns: 1fr;
        width: min(460px, 100%);
    }

    .login__post-card {
        display: none;
    }

    .login__card {
        min-height: 600px;
    }
}

@media (max-width: 991px) {
    .login-layout {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: max(18px, env(safe-area-inset-top, 0px)) 16px max(18px, env(safe-area-inset-bottom, 0px)) !important;
        background:
            radial-gradient(circle at 14% 10%, rgba(255, 236, 213, 0.78), transparent 28%),
            radial-gradient(circle at 100% 90%, rgba(32, 180, 134, 0.32), transparent 34%),
            linear-gradient(145deg, #ff6928 0%, #ff9b70 44%, #f7fffb 100%);
    }

    .login__brand {
        display: none;
    }

    .login__form-wrapper {
        width: 100%;
        min-height: auto;
        padding: 0;
        overflow: visible;
        background: transparent;
    }

    .login__form-wrapper::before,
    .login__form-orb {
        display: none;
    }

    .login__card {
        width: min(430px, 100%);
        min-height: auto;
        padding: 28px 22px 24px;
        gap: 24px;
        border-radius: 30px;
        background: rgba(255, 255, 255, 0.9);
    }

    .login__card::after {
        top: 28px;
        right: 30px;
        width: 62px;
        height: 62px;
    }

    .login__header {
        align-items: center;
        text-align: center;
    }

    .login__logo-mobile {
        display: block;
        width: 112px;
        height: auto;
        margin-bottom: 14px;
        filter: drop-shadow(0 12px 22px rgba(15, 23, 42, 0.12));
    }

    .login__mobile-badge {
        margin-bottom: 20px;
    }

    .login__title {
        font-size: clamp(2rem, 8vw, 2.42rem);
    }

    .login__form {
        gap: 18px;
    }

    .login__support {
        font-size: 0.84rem;
    }
}

@media (max-width: 420px) {
    .login-layout {
        padding-inline: 12px !important;
    }

    .login__card {
        border-radius: 26px;
        padding: 24px 16px 20px;
    }

    .login__mobile-badge {
        width: min(268px, 86vw);
        height: 48px;
        margin-bottom: 16px;
    }

    .login__welcome-script text {
        font-size: 46px;
    }

    .login__input {
        height: 56px;
        border-radius: 14px;
    }

    .login__btn {
        height: 58px;
        border-radius: 14px;
    }
}

/* ============================================
 * Phase 1 responsive polish.
 * Desktop login must scale without clipping when the browser is resized.
 * ============================================ */
@media (min-width: 992px) {
    .login-layout {
        grid-template-columns: minmax(0, 1.28fr) minmax(430px, 0.92fr);
        overflow: hidden;
    }

    .login__brand {
        padding: clamp(22px, 2vw, 38px) clamp(30px, 4vw, 66px);
        clip-path: polygon(0 0, 94% 0, 88.5% 100%, 0 100%);
    }

    .login__brand-content {
        width: min(690px, 82%);
    }

    .login__brand-logo {
        width: clamp(136px, 9.8vw, 184px);
        height: clamp(68px, 5.2vw, 96px);
        margin-bottom: clamp(14px, 1.6vw, 24px);
    }

    .login__brand-title {
        font-size: clamp(1.95rem, 3.12vw, 3.34rem);
        line-height: 1.14;
    }

    .login__brand-wordmark {
        font-size: clamp(3.25rem, 5.15vw, 5.78rem);
        line-height: 0.95;
    }

    .login__brand-subtitle {
        margin-top: clamp(12px, 1.35vw, 18px);
        font-size: clamp(0.86rem, 0.98vw, 1rem);
    }

    .login__feature-grid {
        width: min(540px, 100%);
        margin-top: clamp(14px, 1.35vw, 20px);
        gap: clamp(8px, 0.9vw, 14px);
    }

    .login__feature-pill {
        min-height: clamp(68px, 5.8vw, 84px);
        border-radius: 15px;
    }

    .login__community-panel {
        width: min(620px, 100%);
        margin-top: clamp(14px, 1.35vw, 20px);
        padding: clamp(14px, 1.25vw, 18px);
        gap: 14px;
    }

    .login__form-wrapper {
        align-items: center;
        justify-content: center;
        padding: clamp(24px, 4vw, 72px) clamp(30px, 4.8vw, 82px) clamp(24px, 4vw, 72px) 18px;
    }

    .login__card {
        width: min(480px, 100%);
        min-height: clamp(540px, 70vh, 620px);
        gap: clamp(20px, 2vw, 28px);
        padding: clamp(32px, 3.2vw, 48px) clamp(30px, 3.3vw, 44px);
        transform: none;
    }

    .login__mobile-badge {
        margin-bottom: clamp(22px, 2.2vw, 30px);
    }

    .login__title {
        font-size: clamp(1.85rem, 2.35vw, 2.55rem);
        line-height: 1.08;
    }

    .login__form {
        gap: clamp(17px, 1.5vw, 21px);
    }

    .login__input {
        height: clamp(54px, 4.5vw, 60px);
    }

    .login__btn {
        height: clamp(58px, 5vw, 66px);
    }
}

@media (min-width: 992px) and (max-width: 1280px) {
    .login-layout {
        grid-template-columns: minmax(0, 1fr) minmax(400px, 0.86fr);
    }

    .login__brand {
        clip-path: polygon(0 0, 97% 0, 92% 100%, 0 100%);
    }

    .login__brand-content {
        width: min(560px, 88%);
    }

    .login__feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(430px, 100%);
    }

    .login__community-panel {
        display: none;
    }

    .login__form-wrapper {
        padding-left: 8px;
        padding-right: clamp(24px, 3.8vw, 56px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-layout,
    .login__mobile-badge,
    .login__spinner-icon,
    .login__btn::before {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }

    .login__mobile-badge {
        opacity: 1;
    }

    .login__welcome-script-stroke {
        stroke-dashoffset: 0;
    }

    .login__welcome-script-fill {
        opacity: 1;
    }
}
