/* login.css — ebuyhubpay login only (does not affect register/forgot flow) */

:root {
    --login-bg-deep: #031a3d;
    --login-bg-mid: #052a5c;
    --login-accent: #004aad;
    --login-accent-hover: #003580;
    --login-accent-soft: rgba(0, 74, 173, 0.18);
    --login-text: #0f172a;
    --login-muted: #64748b;
    --login-border: #e2e8f0;
    --login-card: #ffffff;
    --login-radius: 20px;
    --login-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
    --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

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

html {
    -webkit-font-smoothing: antialiased;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--login-text);
    background: var(--login-bg-deep);
    overflow-x: hidden;
}

.login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(0, 86, 200, 0.38), transparent 55%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(56, 189, 248, 0.12), transparent 50%),
        radial-gradient(ellipse 70% 60% at 50% 100%, rgba(0, 74, 173, 0.2), transparent 45%),
        linear-gradient(165deg, var(--login-bg-deep) 0%, var(--login-bg-mid) 48%, #021027 100%);
}

.login-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    max-width: 1120px;
    margin: 0 auto;
    align-items: stretch;
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
    }
}

/* Brand column */
.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    padding-right: clamp(1.5rem, 4vw, 3rem);
    color: #f1f5f9;
}

@media (max-width: 900px) {
    .login-brand {
        padding: 2.5rem 1.5rem 1.5rem;
        text-align: center;
        align-items: center;
    }
}

.login-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(241, 245, 249, 0.7);
    margin-bottom: 1.25rem;
}

.login-brand-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.login-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #fff;
}

.login-brand h1 {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.login-brand h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #fff 0%, #94a8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-brand-lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(241, 245, 249, 0.72);
    margin: 0 0 2rem;
    max-width: 28ch;
}

@media (max-width: 900px) {
    .login-brand-lead {
        max-width: 36ch;
    }
}

.login-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

@media (max-width: 900px) {
    .login-features {
        display: none;
    }
}

.login-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: rgba(241, 245, 249, 0.88);
}

.login-features li i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 111, 255, 0.2);
    color: #a5b4fc;
    font-size: 0.9rem;
}

/* Form column */
.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    padding-left: clamp(1rem, 3vw, 2rem);
}

@media (max-width: 900px) {
    .login-panel {
        padding: 0 1.25rem 2.5rem;
        align-items: flex-start;
    }
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--login-card);
    border-radius: var(--login-radius);
    box-shadow: var(--login-shadow);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: login-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-card-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-home-mobile {
    display: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--login-accent);
    text-decoration: none;
    margin-bottom: 0.65rem;
}

.login-home-mobile:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .login-home-mobile {
        display: inline-block;
    }
}

.login-card-header {
    margin-bottom: 1.5rem;
}

.login-card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.login-card-header p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--login-muted);
    line-height: 1.5;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.45;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.login-alert i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.login-form .field {
    margin-bottom: 1.15rem;
}

.login-form label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--login-text);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid var(--login-border);
    border-radius: 12px;
    background: #fafbfc;
    color: var(--login-text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-form input::placeholder {
    color: #94a3b8;
}

.login-form input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.login-form input:focus {
    outline: none;
    border-color: var(--login-accent);
    background: #fff;
    box-shadow: 0 0 0 4px var(--login-accent-soft);
}

.input-password-wrap {
    position: relative;
}

.input-password-wrap input {
    padding-right: 2.75rem;
}

.toggle-password {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #94a3b8;
    padding: 0.25rem;
    border: none;
    background: none;
    font-size: 1rem;
    line-height: 1;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.toggle-password:hover {
    color: var(--login-accent);
    background: var(--login-accent-soft);
}

.login-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: -0.25rem;
    margin-bottom: 1.25rem;
}

.login-row-actions a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--login-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.login-row-actions a:hover {
    color: var(--login-accent);
}

.btn-login-primary {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--login-accent) 0%, #3b4fd9 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 28px -8px rgba(79, 111, 255, 0.55);
    transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.btn-login-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 32px -8px rgba(79, 111, 255, 0.55);
}

.btn-login-primary:active {
    transform: translateY(1px);
}

.btn-login-vendor {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--login-accent);
    background: var(--login-card);
    border: 1.5px solid var(--login-border);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.btn-login-vendor:hover {
    border-color: var(--login-accent);
    background: var(--login-accent-soft);
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--login-border);
    font-size: 0.9rem;
    color: var(--login-muted);
}

.login-footer a {
    color: var(--login-accent);
    font-weight: 600;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(241, 245, 249, 0.55);
    text-decoration: none;
    transition: color 0.2s;
}

.login-back-home:hover {
    color: #fff;
}

@media (min-width: 901px) {
    .login-back-home {
        position: fixed;
        bottom: 1.5rem;
        left: 1.5rem;
        z-index: 2;
        margin-top: 0;
    }
}

@media (max-width: 900px) {
    .login-back-home {
        display: none;
    }
}
