:root {
    --hm-primary: #F15A24;
    --hm-primary-dark: #D94E1A;
    --hm-primary-light: #FF7A45;
    --hm-primary-soft: rgba(241, 90, 36, 0.15);
    --hm-primary-glow: rgba(241, 90, 36, 0.35);
    --hm-text: #333333;
    --hm-bg-dark: #1a1614;
    --hm-bg-warm: #231c18;
}

html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--hm-bg-dark);
}

/* ===== Warm dark background with orange accents ===== */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: var(--hm-bg-dark);
}
.login-bg .bg-photo {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(241, 90, 36, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 85% 75%, rgba(255, 122, 69, 0.12) 0%, transparent 55%),
        linear-gradient(160deg, #1a1614 0%, #231c18 45%, #1a1614 100%);
    transform: scale(1.02);
    transition: transform 30s ease-out;
}
.login-bg:hover .bg-photo { transform: scale(1.04); }
.login-bg .overlay1 { position: absolute; inset: 0; background: rgba(26, 22, 20, 0.4); }
.login-bg .overlay2 {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(26, 22, 20, 0.85), rgba(241, 90, 36, 0.08), rgba(26, 22, 20, 0.92));
}
.login-bg .orb-right {
    position: absolute; top: 5%; right: -8%;
    width: 680px; height: 680px; border-radius: 50%;
    background: rgba(241, 90, 36, 0.14);
    filter: blur(100px);
}
.login-bg .orb-left {
    position: absolute; bottom: -15%; left: -10%;
    width: 560px; height: 560px; border-radius: 50%;
    background: rgba(255, 122, 69, 0.1);
    filter: blur(90px);
}
.login-bg .grid-lines {
    position: absolute; inset: 0; opacity: 0.08;
    background: linear-gradient(rgba(241, 90, 36, 0.25) 1px, transparent 1px),
                linear-gradient(90deg, rgba(241, 90, 36, 0.25) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1), transparent);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1), transparent);
}

/* ===== Main layout ===== */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 3vh, 48px) clamp(24px, 5vw, 96px);
}
.login-content {
    width: 100%;
    max-width: min(1760px, 100%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(32px, 5vw, 80px);
    min-height: min(720px, 88vh);
}

/* ===== Left brand panel ===== */
.brand-panel {
    flex: 1 1 58%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 24px clamp(8px, 2vw, 24px) 24px 0;
    color: #fff;
}
.brand-inner {
    max-width: min(720px, 100%);
    width: 100%;
}
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin-bottom: 28px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(241, 90, 36, 0.35);
    box-shadow: 0 8px 32px rgba(241, 90, 36, 0.12);
    line-height: 0;
}
.brand-icon .brand-logo {
    width: 72px;
    height: 72px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
    background: transparent;
}
.brand-title {
    font-size: clamp(2.25rem, 3.2vw + 1rem, 3.5rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 22px;
    color: #fff;
}
.brand-title .highlight {
    background: linear-gradient(90deg, #FFB088, #F15A24, #FFD4BC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.brand-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 0.5vw + 0.9rem, 1.25rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}
.brand-bar {
    width: 56px;
    height: 4px;
    background: linear-gradient(90deg, var(--hm-primary), var(--hm-primary-light));
    border-radius: 2px;
    margin-bottom: 28px;
    box-shadow: 0 0 16px var(--hm-primary-glow);
}
.brand-desc {
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(0.95rem, 0.35vw + 0.85rem, 1.0625rem);
    line-height: 1.75;
    max-width: 640px;
}
.brand-payments {
    margin-top: 36px;
    border-top: 1px solid rgba(241, 90, 36, 0.2);
    padding-top: 28px;
}
.brand-payments .payments-label {
    font-size: 11px;
    color: rgba(255, 180, 140, 0.55);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.brand-payments .payments-logos { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.pay-logo-card {
    height: 46px;
    min-width: 110px;
    padding: 0 16px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(241, 90, 36, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: background 0.3s, border-color 0.3s;
    cursor: default;
}
.pay-logo-card:hover {
    background: rgba(241, 90, 36, 0.1);
    border-color: rgba(241, 90, 36, 0.35);
}
.pay-logo-card .pay-logo-img {
    display: block;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    opacity: 0.75;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s;
}
.pay-logo-card:hover .pay-logo-img { opacity: 1; }
.pay-logo-card .pay-logo-img--upi { height: 18px; }
.pay-logo-card .pay-logo-img--paytm { height: 15px; }
.pay-logo-card .pay-logo-img--phonepe { height: 22px; }

/* ===== Right form card ===== */
.form-panel {
    flex: 0 0 clamp(360px, 26vw, 480px);
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 14px 0 14px clamp(7px, 1.2vw, 14px);
}
.form-card {
    position: relative;
    background: #ffffff;
    padding: 28px 28px 24px;
    border-radius: 20px;
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(241, 90, 36, 0.08);
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}
.form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hm-primary-dark), var(--hm-primary), var(--hm-primary-light));
}
.form-card > form.layui-form {
    flex: 1 1 auto;
    min-height: 0;
}
.form-header.form-header--brand-only {
    text-align: center;
    margin-bottom: 22px;
    line-height: 0;
    background: transparent;
}
.form-brand-logo {
    display: block;
    margin: 0 auto;
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: transparent;
    border: none;
    outline: none;
    vertical-align: middle;
}

/* ===== Form fields ===== */
.form-card .field-group { margin-bottom: 14px; }
.form-card .field-label {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 14px;
    font-weight: 600;
    color: var(--hm-text);
    margin-bottom: 6px;
}
.form-card .field-label .hint {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}
.form-card .input-wrap { position: relative; }
.form-card .input-wrap .icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #aaa;
    pointer-events: none;
}
.form-card .input-wrap input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 36px;
    border: 1px solid #e8e0dc;
    border-radius: 8px;
    font-size: 15px;
    color: var(--hm-text);
    background: #faf8f7;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.form-card .input-wrap input:focus {
    border-color: var(--hm-primary);
    box-shadow: 0 0 0 3px var(--hm-primary-soft);
    background: #fff;
}
.form-card .input-wrap input::placeholder {
    color: #aaa;
    font-weight: 400;
}

.captcha-row { display: flex; gap: 8px; align-items: stretch; }
.captcha-row .input-wrap { flex: 1; }
.captcha-box {
    height: 42px;
    width: clamp(115px, 24%, 142px);
    flex-shrink: 0;
    border: 1px solid #e8e0dc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f5f0ee;
    overflow: hidden;
    transition: border-color 0.2s;
}
.captcha-box:hover { border-color: var(--hm-primary); }
.captcha-box img { height: 31px; width: 100%; object-fit: cover; }

.form-card .btn-login {
    width: 100%;
    height: 44px;
    margin-top: 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--hm-primary), var(--hm-primary-dark));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px var(--hm-primary-glow);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    letter-spacing: 0.05em;
}
.form-card .btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(241, 90, 36, 0.4);
    filter: brightness(1.05);
}
.form-card .btn-login:active { transform: translateY(0); }

.form-footer {
    margin-top: auto;
    padding-top: 16px;
    text-align: center;
    border-top: 1px solid #f0ebe8;
}
.form-footer p {
    font-size: 11px;
    color: #999;
    opacity: 0.85;
    letter-spacing: 0.12em;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
}

@media (max-width: 900px) {
    .brand-panel { display: none; }
    .login-content {
        justify-content: center;
        min-height: auto;
        gap: 0;
    }
    .form-panel {
        flex: 1 1 auto;
        width: 100%;
        max-width: 480px;
        padding: 14px;
    }
    .form-card { min-height: auto; }
}
@media (min-width: 901px) and (max-width: 1200px) {
    .login-content { gap: clamp(24px, 4vw, 48px); }
    .form-panel { flex-basis: clamp(360px, 30vw, 456px); }
}
