﻿:root {
    /* =====================================================
       LAMHOA HUB LOGIN - OPTION 1
       Card login giữa màn hình, rộng hơn, responsive tốt
    ===================================================== */
    --primary: #28a745;
    --primary-dark: #1f8a38;
    --primary-soft: #eaf8ee;
    --bg: #f4f8f6;
    --surface: #ffffff;
    --text-main: #102018;
    --text-muted: #667085;
    --border: #e5e7eb;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --input-bg: #ffffff;
    --input-border: #d7e2dc;
    --shadow-card: 0 28px 75px rgba(16, 32, 24, .16);
    --shadow-soft: 0 16px 34px rgba(40, 167, 69, .20);
    --radius-card: 28px;
    --radius-input: 16px;
}

/* =====================================================
   RESET
===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--text-main);
    background: var(--bg);
}

/* =====================================================
   BACKGROUND FULL WIDTH
===================================================== */
.login-bg {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 14px;
    background: radial-gradient(820px 420px at 8% 0%, rgba(40, 167, 69, .16), transparent 60%), radial-gradient(760px 440px at 100% 18%, rgba(37, 99, 235, .10), transparent 62%), linear-gradient(135deg, #f7fbf8 0%, #edf8f1 48%, #f8fafc 100%);
    overflow-x: hidden;
}

/* =====================================================
   OPTION 1 - FULL WIDTH WRAPPER
   Không khóa 440px nữa, card tự căn giữa và rộng 520px
===================================================== */
.login-shell {
    width: 100%;
    max-width: 100%;
    padding: 0 24px;
}

/* =====================================================
   LOGIN CARD
===================================================== */
.login-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

/* =====================================================
   HEADER
===================================================== */
.login-head {
    position: relative;
    padding: 32px 28px 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(234, 248, 238, .96), rgba(255, 255, 255, 1)), radial-gradient(260px 150px at 50% 0%, rgba(40, 167, 69, .18), transparent 70%);
    border-bottom: 1px solid var(--border);
}

    .login-head::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, transparent, rgba(40, 167, 69, .08), transparent);
        pointer-events: none;
    }

.login-logo-wrap {
    width: 86px;
    height: 86px;
    margin: 0 auto 14px;
    border-radius: 26px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .10);
    border: 1px solid rgba(40, 167, 69, .14);
    position: relative;
    z-index: 1;
}

.login-logo {
    max-width: 66px;
    max-height: 66px;
    object-fit: contain;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 11px;
    padding: 7px 17px;
    border-radius: 999px;
    background: rgba(40, 167, 69, .10);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.login-title {
    font-size: 24px;
    line-height: 1.28;
    font-weight: 950;
    color: var(--text-main);
    letter-spacing: -.025em;
    position: relative;
    z-index: 1;
}

.login-sub {
    max-width: 390px;
    margin: 8px auto 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* =====================================================
   BODY
===================================================== */
.login-body {
    padding: 28px 30px 32px;
}

/* =====================================================
   ALERT
===================================================== */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: #991b1b;
    padding: 12px 13px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 17px;
}

.login-alert-icon {
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--danger);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

/* =====================================================
   FORM
===================================================== */
.login-field {
    margin-bottom: 16px;
}

.login-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 850;
    color: #475467;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.login-input {
    width: 100%;
    height: 50px;
    border-radius: var(--radius-input);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    padding: 10px 15px;
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

    .login-input:focus {
        border-color: var(--primary);
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(40, 167, 69, .14);
    }

    .login-input::placeholder {
        color: #98a2b3;
    }

/* =====================================================
   PASSWORD
===================================================== */
.pw-wrap {
    position: relative;
}

.pw-input {
    padding-right: 54px;
}

.pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 35px;
    height: 35px;
    transform: translateY(-50%);
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

    .pw-toggle:hover,
    .pw-toggle.is-show {
        background: var(--primary-soft);
        border-color: rgba(40, 167, 69, .35);
    }

    .pw-toggle:active {
        transform: translateY(-50%) scale(.96);
    }

/* =====================================================
   REMEMBER
===================================================== */
.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 7px 0 20px;
}

.login-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #344054;
    cursor: pointer;
    user-select: none;
}

    .login-check input {
        width: 18px;
        height: 18px;
        accent-color: var(--primary);
    }

/* =====================================================
   BUTTON
===================================================== */
.login-btn {
    width: 100%;
    height: 52px;
    border-radius: 999px;
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: .01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

    .login-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 20px 42px rgba(40, 167, 69, .27);
    }

    .login-btn:active {
        transform: translateY(1px);
    }

    .login-btn[disabled] {
        opacity: .72;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

/* Loading */
.spinner {
    display: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #ffffff;
    animation: spin .75s linear infinite;
}

.login-btn.is-loading .spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   FOOTER
===================================================== */
.login-foot {
    width: 100%;
    max-width: 520px;
    margin: 17px auto 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}

    .login-foot strong {
        display: block;
        color: var(--primary-dark);
        font-size: 13px;
        font-weight: 950;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    .login-foot span {
        display: block;
    }

/* =====================================================
   RESPONSIVE TABLET
===================================================== */
@media (max-width: 768px) {
    .login-bg {
        padding: 22px 12px;
    }

    .login-shell {
        padding: 0 12px;
    }

    .login-card,
    .login-foot {
        max-width: 560px;
    }

    .login-head {
        padding: 28px 22px 22px;
    }

    .login-body {
        padding: 24px 24px 28px;
    }

    .login-title {
        font-size: 22px;
    }
}

/* =====================================================
   RESPONSIVE MOBILE
===================================================== */
@media (max-width: 480px) {
    .login-bg {
        align-items: flex-start;
        padding: 16px 10px;
    }

    .login-shell {
        padding: 0;
    }

    .login-card {
        max-width: 100%;
        border-radius: 23px;
    }

    .login-foot {
        max-width: 100%;
        margin-top: 14px;
    }

    .login-head {
        padding: 24px 18px 20px;
    }

    .login-body {
        padding: 21px 18px 24px;
    }

    .login-logo-wrap {
        width: 76px;
        height: 76px;
        border-radius: 23px;
    }

    .login-logo {
        max-width: 58px;
        max-height: 58px;
    }

    .login-brand {
        font-size: 11px;
        padding: 6px 14px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-sub {
        font-size: 13px;
    }

    .login-input {
        height: 48px;
        font-size: 14.5px;
    }

    .login-btn {
        height: 50px;
        font-size: 14.5px;
    }
}

/* =====================================================
   RESPONSIVE SMALL MOBILE
===================================================== */
@media (max-width: 360px) {
    .login-bg {
        padding: 12px 8px;
    }

    .login-head {
        padding: 22px 15px 18px;
    }

    .login-body {
        padding: 19px 15px 22px;
    }

    .login-title {
        font-size: 18px;
    }

    .login-sub {
        font-size: 12.5px;
    }

    .login-check {
        font-size: 13px;
    }

    .login-input {
        height: 46px;
    }

    .login-btn {
        height: 48px;
    }
}

/* =====================================================
   LARGE SCREEN
===================================================== */
@media (min-width: 1200px) {
    .login-card,
    .login-foot {
        max-width: 540px;
    }

    .login-title {
        font-size: 25px;
    }
}
