/* =====================================================
   LOGIN PAGE
   Chỉ style riêng login, dùng biến từ shared
===================================================== */

.login-page {
    min-height: auto;
    padding: 5px 0 28px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background:
        radial-gradient(circle at 8% 78%, rgba(0, 32, 69, 0.055), transparent 24%),
        radial-gradient(circle at 92% 15%, rgba(138, 118, 0, 0.07), transparent 26%),
        linear-gradient(135deg, #fffdf8 0%, #f7f4ec 48%, #eef2f5 100%);
}

.login-card {
    width: min(430px, calc(100% - 32px));
    margin-top: 22px;
    padding: 28px 30px 26px;
    border-radius: 12px;
    background: rgba(255, 253, 248, 0.98);
    border: 1px solid #d7c99f;
    box-shadow: 0 20px 48px rgba(64, 50, 22, 0.13);
}

.login-head {
    margin-bottom: 22px;
    text-align: center;
}

.login-head::before {
    content: "login";
    width: 50px;
    height: 50px;
    margin: 0 auto 13px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--user-blue);
    color: #fffdf7;
    font-family: "Material Symbols Outlined";
    font-size: 25px;
    font-weight: 250;
    box-shadow: 0 12px 26px rgba(0, 32, 69, 0.18);
}

.login-head h1 {
    margin: 0;
    color: var(--user-text);
    font-size: 28px;
    font-weight: 780;
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.login-head p {
    max-width: 320px;
    margin: 8px auto 0;
    color: var(--user-muted);
    font-size: 13px;
    line-height: 1.5;
}

.login-alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid #efb2ad;
    background: #fff5f4;
    color: var(--user-danger);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
}

.login-alert.success {
    border-color: #a7e6c2;
    background: #f0fff6;
    color: #047857;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-field {
    display: grid;
    gap: 7px;
}

.login-field label {
    color: var(--user-text);
    font-size: 12.5px;
    font-weight: 720;
}

.login-input {
    height: 46px;
    padding: 0 12px;
    border: 1px solid #d7c99f;
    border-radius: 10px;
    background: #fffdf8;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: 0.16s ease;
}

.login-input:focus-within {
    border-color: var(--user-gold);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(138, 118, 0, 0.08);
}

.login-input .material-symbols-outlined {
    color: var(--user-gold);
    font-size: 20px;
    font-weight: 260;
}

.login-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--user-text);
    font-size: 14px;
    font-weight: 500;
}

.login-input input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.login-submit {
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: var(--user-blue);
    color: #fffdf7;
    font-size: 14px;
    font-weight: 760;
    box-shadow: 0 13px 26px rgba(0, 32, 69, 0.18);
    transition: 0.16s ease;
}

.login-submit:hover {
    background: var(--user-blue-light);
    transform: translateY(-1px);
}

.login-divider {
    margin: 20px 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8d98a7;
    font-size: 12px;
    font-weight: 600;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e4dac8;
}

.login-google {
    height: 44px;
    border: 1px solid #d7c99f;
    border-radius: 10px;
    background: #fffdf8;
    color: var(--user-text);
    font-size: 13.5px;
    font-weight: 720;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: 0.16s ease;
}

.login-google:hover {
    border-color: var(--user-gold);
    background: #fffaf0;
    color: var(--user-text);
    transform: translateY(-1px);
}

.login-google-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 32, 69, 0.08);
}

.login-google-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.login-google-text {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: var(--user-text);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 720;
    line-height: 1;
    display: inline;
    box-shadow: none;
    white-space: nowrap;
}

.login-back {
    width: fit-content;
    margin: 16px auto 0;
    color: var(--user-muted);
    font-size: 12.5px;
    font-weight: 650;
    text-decoration: none;
    display: block;
    text-align: center;
}

.login-back:hover {
    color: var(--user-gold);
}

@media (max-width: 640px) {
    .login-page {
        padding: 2px 0 22px;
    }

    .login-card {
        width: calc(100% - 24px);
        margin-top: 16px;
        padding: 24px 20px 22px;
    }

    .login-head h1 {
        font-size: 25px;
    }

    .login-google-text {
        font-size: 13px;
    }
}

/* =====================================================
   MOBILE LOGIN ONLY
   Trên điện thoại chỉ hiện form đăng nhập, không hiện
   header menu, footer, trang chủ/tra cứu/tìm kiếm.
===================================================== */
.login-back {
    display: none !important;
}

@media (max-width: 768px) {
    body.user-page {
        min-height: 100dvh;
        overflow-x: hidden;
        background:
            radial-gradient(circle at 12% 18%, rgba(0, 32, 69, 0.08), transparent 30%),
            radial-gradient(circle at 90% 82%, rgba(138, 118, 0, 0.08), transparent 28%),
            #fffdf8;
    }

    body.user-page .uni-header,
    body.user-page .uni-footer {
        display: none !important;
    }

    body.user-page .uni-main {
        min-height: 100dvh;
        padding: 0 !important;
        display: block;
    }

    .login-page {
        min-height: 100dvh;
        padding: max(18px, env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
        align-items: center;
        background:
            radial-gradient(circle at 15% 18%, rgba(0, 32, 69, 0.08), transparent 30%),
            radial-gradient(circle at 88% 80%, rgba(138, 118, 0, 0.08), transparent 30%),
            linear-gradient(135deg, #fffdf8 0%, #f8f3e8 100%);
    }

    .login-card {
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
        padding: 28px 22px 26px;
        border-radius: 24px;
        box-shadow: 0 22px 54px rgba(64, 50, 22, 0.14);
    }

    .login-head::before {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        font-size: 30px;
    }

    .login-head h1 {
        font-size: 32px;
        letter-spacing: -0.05em;
    }

    .login-head p {
        font-size: 15px;
    }

    .login-field label {
        font-size: 14px;
    }

    .login-input {
        height: 56px;
        border-radius: 16px;
        padding: 0 16px;
    }

    .login-input input {
        font-size: 16px;
    }

    .login-submit {
        height: 56px;
        border-radius: 16px;
        font-size: 16px;
    }

    .login-google {
        height: 52px;
        border-radius: 16px;
    }

    .login-google-text {
        font-size: 15px;
    }
}
/* =====================================================
   CLEAN RESPONSIVE PATCH - LOGIN
===================================================== */
.login-page,
.login-shell,
.login-card,
.login-form {
    min-width: 0;
}

.login-card {
    max-width: 100%;
}

@media (max-width: 640px) {
    .login-page {
        padding: 16px 12px;
        align-items: stretch;
    }

    .login-shell,
    .login-card {
        width: 100% !important;
    }

    .login-card {
        padding: 18px 16px !important;
    }

    .login-brand,
    .login-title {
        text-align: center;
    }
}

/* =====================================================
   CLEAN MOBILE OVERFLOW GUARD
===================================================== */
@media (max-width: 640px) {
    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }
}

/* =====================================================
   LOGIN PAGE - DESKTOP + MOBILE GIỐNG GIAO DIỆN USER
   Giữ header/footer trên điện thoại
===================================================== */

.login-page,
.login-page * {
    box-sizing: border-box;
    min-width: 0;
}

.login-page {
    width: 100%;
    min-height: auto;
    padding: 26px 16px 42px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background:
        radial-gradient(circle at 8% 78%, rgba(0, 32, 69, 0.055), transparent 24%),
        radial-gradient(circle at 92% 15%, rgba(138, 118, 0, 0.07), transparent 26%),
        linear-gradient(135deg, #fffdf8 0%, #f7f4ec 48%, #eef2f5 100%);
}

/* Không cho login page ẩn header/footer trên mobile */
body.user-page .uni-header,
body.user-page .uni-footer {
    display: block;
}

body.user-page .uni-main {
    min-height: auto;
}

/* =====================================================
   CARD
===================================================== */

.login-card {
    width: min(430px, 100%);
    margin: 0 auto;
    padding: 28px 30px 26px;
    border: 1px solid #d7c99f;
    border-radius: 12px;
    background: rgba(255, 253, 248, 0.98);
    box-shadow: 0 20px 48px rgba(64, 50, 22, 0.13);
}

.login-head {
    margin-bottom: 22px;
    text-align: center;
}

.login-head::before {
    content: "login";
    width: 50px;
    height: 50px;
    margin: 0 auto 13px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--user-blue, #002045);
    color: #fffdf7;
    font-family: "Material Symbols Outlined";
    font-size: 25px;
    font-weight: 250;
    box-shadow: 0 12px 26px rgba(0, 32, 69, 0.18);
}

.login-head h1 {
    margin: 0;
    color: var(--user-text, #002045);
    font-size: 28px;
    font-weight: 780;
    line-height: 1.1;
    letter-spacing: -0.045em;
}

.login-head p {
    max-width: 320px;
    margin: 8px auto 0;
    color: var(--user-muted, #64748b);
    font-size: 13px;
    line-height: 1.5;
}

/* =====================================================
   ALERT
===================================================== */

.login-alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid #efb2ad;
    border-radius: 9px;
    background: #fff5f4;
    color: var(--user-danger, #b42318);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
}

.login-alert.success {
    border-color: #a7e6c2;
    background: #f0fff6;
    color: #047857;
}

/* =====================================================
   FORM
===================================================== */

.login-form {
    display: grid;
    gap: 14px;
}

.login-field {
    display: grid;
    gap: 7px;
}

.login-field label {
    color: var(--user-text, #002045);
    font-size: 12.5px;
    font-weight: 720;
}

.login-input {
    height: 46px;
    padding: 0 12px;
    border: 1px solid #d7c99f;
    border-radius: 10px;
    background: #fffdf8;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: 0.16s ease;
}

.login-input:focus-within {
    border-color: var(--user-gold, #8a7600);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(138, 118, 0, 0.08);
}

.login-input .material-symbols-outlined {
    flex: 0 0 auto;
    color: var(--user-gold, #8a7600);
    font-size: 20px;
    font-weight: 260;
}

.login-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--user-text, #002045);
    font-size: 14px;
    font-weight: 500;
}

.login-input input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.login-submit {
    height: 46px;
    border: 0;
    border-radius: 10px;
    background: var(--user-blue, #002045);
    color: #fffdf7;
    font-size: 14px;
    font-weight: 760;
    cursor: pointer;
    box-shadow: 0 13px 26px rgba(0, 32, 69, 0.18);
    transition: 0.16s ease;
}

.login-submit:hover {
    background: var(--user-blue-light, #07315f);
    transform: translateY(-1px);
}

/* =====================================================
   GOOGLE LOGIN
===================================================== */

.login-divider {
    margin: 20px 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8d98a7;
    font-size: 12px;
    font-weight: 600;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e4dac8;
}

.login-google {
    height: 44px;
    border: 1px solid #d7c99f;
    border-radius: 10px;
    background: #fffdf8;
    color: var(--user-text, #002045);
    font-size: 13.5px;
    font-weight: 720;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: 0.16s ease;
}

.login-google:hover {
    border-color: var(--user-gold, #8a7600);
    background: #fffaf0;
    color: var(--user-text, #002045);
    transform: translateY(-1px);
}

.login-google-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 4px 10px rgba(0, 32, 69, 0.08);
}

.login-google-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.login-google-text {
    color: var(--user-text, #002045);
    font-size: 13.5px;
    font-weight: 720;
    line-height: 1;
    white-space: nowrap;
}

/* Không hiện nút quay lại nếu file blade còn dùng */
.login-back {
    display: none !important;
}

/* =====================================================
   RESPONSIVE - TABLET
===================================================== */

@media (max-width: 768px) {
    .login-page {
        padding: 22px 14px 36px;
        align-items: flex-start;
        background:
            radial-gradient(circle at 12% 18%, rgba(0, 32, 69, 0.06), transparent 30%),
            radial-gradient(circle at 90% 82%, rgba(138, 118, 0, 0.07), transparent 28%),
            linear-gradient(135deg, #fffdf8 0%, #f7f4ec 58%, #eef2f5 100%);
    }

    .login-card {
        width: min(430px, 100%);
        padding: 24px 22px 22px;
        border-radius: 14px;
        box-shadow: 0 16px 38px rgba(64, 50, 22, 0.12);
    }

    .login-head::before {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        font-size: 25px;
    }

    .login-head h1 {
        font-size: 28px;
    }

    .login-head p {
        font-size: 13.5px;
    }
}

/* =====================================================
   RESPONSIVE - MOBILE
   Header/footer vẫn hiện như máy tính, chỉ card co gọn lại
===================================================== */

@media (max-width: 640px) {
    body.user-page {
        min-height: 100dvh;
        overflow-x: hidden;
        background: #fffdf8;
    }

    body.user-page .uni-header,
    body.user-page .uni-footer {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body.user-page .uni-main {
        min-height: auto !important;
        padding: 0 !important;
        display: block !important;
    }

    .login-page {
        min-height: auto !important;
        padding: 18px 12px 30px !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    .login-card {
        width: 100% !important;
        max-width: 430px !important;
        margin: 0 auto !important;
        padding: 22px 16px 20px !important;
        border-radius: 12px !important;
    }

    .login-head {
        margin-bottom: 18px !important;
    }

    .login-head::before {
        width: 46px !important;
        height: 46px !important;
        margin-bottom: 11px !important;
        border-radius: 11px !important;
        font-size: 23px !important;
    }

    .login-head h1 {
        font-size: 25px !important;
        line-height: 1.15 !important;
    }

    .login-head p {
        max-width: 290px !important;
        margin-top: 7px !important;
        font-size: 12.5px !important;
        line-height: 1.45 !important;
    }

    .login-form {
        gap: 12px !important;
    }

    .login-field {
        gap: 6px !important;
    }

    .login-field label {
        font-size: 12px !important;
    }

    .login-input {
        height: 44px !important;
        padding: 0 11px !important;
        border-radius: 9px !important;
        gap: 8px !important;
    }

    .login-input .material-symbols-outlined {
        font-size: 19px !important;
    }

    .login-input input {
        font-size: 13px !important;
    }

    .login-submit {
        height: 44px !important;
        border-radius: 9px !important;
        font-size: 13.5px !important;
    }

    .login-divider {
        margin: 18px 0 14px !important;
        font-size: 11.5px !important;
    }

    .login-google {
        height: 43px !important;
        border-radius: 9px !important;
        gap: 8px !important;
    }

    .login-google-icon {
        width: 23px !important;
        height: 23px !important;
    }

    .login-google-icon svg {
        width: 17px !important;
        height: 17px !important;
    }

    .login-google-text {
        font-size: 13px !important;
    }
}

/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 380px) {
    .login-page {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .login-card {
        padding: 20px 14px 18px !important;
    }

    .login-head h1 {
        font-size: 23px !important;
    }

    .login-head p {
        font-size: 12px !important;
    }

    .login-input input {
        font-size: 12.5px !important;
    }

    .login-google-text {
        font-size: 12.5px !important;
    }
}

/* =====================================================
   MOBILE OVERFLOW GUARD
===================================================== */

@media (max-width: 640px) {
    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }
}