﻿/* ============================================================
   CSS Variables  (giữ nguyên để dễ tuỳ chỉnh màu sắc)
   ============================================================ */
:root {
    --main:         #2D9B6F;
    --main-light:   #5BBF8E;
    --main-focus:   #B8E8D3;
    --main-dark:    #1A6B4A;
    --second:       #F5A623;
    --second-light: #FFD166;
    --second-focus: #FFE8B3;
    --second-dark:  #D4700A;
    --title:        #0D3D2A;
    --text:         #67747c;
    --text-dark:    #543c04;
    --third:        #FF8C42;
    --four:         #36C8FF;
    --light:        #e0f3ea;
    --border:       #B8E8D3;
}

/* ============================================================
   Base
   ============================================================ */
body {
    background: #e8f4f0;
    margin: 0; padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    color: var(--text);
}

/* ============================================================
   Header / .tophead
   ============================================================ */
.tophead {
    background: #fff;
    padding: 13px 0;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

/* Flex wrapper bên trong header */
.tophead-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity .2s;
}
.logo-brand:hover { opacity: .8; text-decoration: none; }
.logo-img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Nút quay lại */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #ddd;
    padding: 8px 18px;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: border-color .2s, color .2s;
}
.btn-back:hover { border-color: var(--main); color: var(--main); text-decoration: none; }

/* Backward-compat: giữ h1 / a cũ trong .tophead */
.tophead h1   { color: var(--main); font-size: 22px; margin: 0; font-weight: 700; font-style: italic; }
.tophead a    { color: var(--text); text-decoration: none; }

/* ============================================================
   Main / Background  (.login-main)
   ============================================================ */
.login-main {
    position: relative;
    min-height: calc(100vh - 55px - 46px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(150deg, #eaf6f1 0%, #d5eee5 50%, #c4e5d8 100%);
    padding: 40px 16px;
}

/* SVG minh hoạ phía sau */
.login-bg-svg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Wrapper căn giữa card */
.login-card-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 500px;
}

/* ============================================================
   Card  (.login-form)
   ============================================================ */
.login-form {
    background: #fff;
    border-radius: 14px;
    padding: 44px 44px 36px;
    box-shadow: 0 8px 32px rgba(45,155,111,0.10), 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
}
/* Ẩn đường trang trí cũ ở đầu card */
.login-form::before { display: none; }

/* Tiêu đề */
.login-form h2,
.login-form .title {
    font-size: 22px;
    color: var(--title);
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: 0.4px;
}

.login-form p {
    font-size: 14px;
    color: var(--text);
    text-align: center;
    margin-bottom: 20px;
}

/* Link (quên mật khẩu…) */
.login-form .link { text-align: right; margin: 8px 0 20px; }
.login-form .link a { color: var(--main); font-size: 14px; }
.login-form .link a:hover { text-decoration: underline; }

/* ============================================================
   Input có icon  (.textbox / .txt)  — dùng ở Login.aspx
   ============================================================ */
.login-form .textbox {
    margin-top: 14px;
    position: relative;
}

/* Icon Font Awesome ở bên trái (không có nền màu) */
.login-form .textbox::before {
    content: "\f0e0"; /* envelope */
    font-family: FontAwesome;
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c0c0;
    font-size: 15px;
    z-index: 1;
    background: none;
    width: auto; height: auto;
    padding: 0;
}
.login-form .password::before { content: "\f023"; /* lock    */ }
.login-form .username::before  { content: "\f0e0"; /* envelope*/ }

.login-form .txt {
    width: 100%;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 13px 14px 13px 42px;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    color: #333;
    background: #fff;
}
.login-form .txt:focus {
    outline: none;
    border-color: var(--main);
    box-shadow: 0 0 0 3px var(--main-focus);
}
.login-form .txt::-webkit-input-placeholder { color: #c8c8c8; }
.login-form .txt::placeholder              { color: #c8c8c8; }

/* ============================================================
   Hàng checkbox + nút đăng nhập  (.bottom)
   ============================================================ */
.login-form .bottom {
    position: relative;
    margin-top: 18px;
    margin-bottom: 4px;
}

.login-form .check-remember {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 14px;
}
.login-form .check-remember label {
    font-weight: normal;
    margin: 0;
    cursor: pointer;
    color: var(--text);
}

/* Nút đăng nhập */
.login-form .bottom .btn.submit,
.login-form .bottom input[type="submit"] {
    display: block;
    width: 100%;
    background: var(--main);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    padding: 13px 0;
    letter-spacing: 0.3px;
    transition: background .2s;
    text-align: center;
    cursor: pointer;
}
.login-form .bottom .btn.submit:hover,
.login-form .bottom input[type="submit"]:hover { background: var(--main-dark); }

/* ============================================================
   Divider "HOẶC"
   Áp dụng cho .border-top ngay sau <p class="link">
   ============================================================ */
p.link + .text-center.border-top {
    border-top: none;
    padding-top: 0;
    margin-top: 20px;
    position: relative;
}
p.link + .text-center.border-top::before {
    content: "HOẶC";
    display: block;
    text-align: center;
    font-size: 11px;
    color: #c8c8c8;
    letter-spacing: 3px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    background: #fff;
    width: 56px;
    margin: 0 auto 16px;
    padding: 0 8px;
    /* Hai đường kẻ hai bên chữ HOẶC */
    background-image:
        linear-gradient(#e2e2e2, #e2e2e2),
        linear-gradient(#e2e2e2, #e2e2e2);
    background-size: calc(50% - 32px) 1px, calc(50% - 32px) 1px;
    background-position: left center, right center;
    background-repeat: no-repeat;
}

/* .border-top thứ hai (thông tin liên hệ) */
.text-center.border-top + .text-center.border-top {
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text);
}

/* .border-top mặc định (backward-compat) */
.border-top {
    padding-top: 16px;
    border-top: 1px solid #ebebeb;
    margin-top: 16px;
    color: var(--main);
}
.border-top a { color: var(--main); }

/* ============================================================
   Nút đăng ký  (.btn-register)
   ============================================================ */
.btn-register {
    display: block;
    width: 100%;
    border: 1.5px solid var(--main);
    padding: 11px 0;
    text-transform: uppercase;
    color: var(--main);
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    background: #fff;
    text-align: center;
    transition: background .2s, color .2s;
    letter-spacing: 0.4px;
    box-sizing: border-box;
    cursor: pointer;
}
.btn-register:hover    { background: var(--main); color: #fff; }
.btn-register a        { color: inherit; text-decoration: none; display: block; }
.btn-register a:hover  { color: #fff; }

/* ============================================================
   Input Bootstrap  (.form-group / .form-control)
   — dùng ở Register.aspx
   ============================================================ */
.login-form .form-group       { margin-bottom: 16px; }
.login-form .form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
    display: block;
}
.login-form .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    padding: 10px 14px;
    transition: border-color .2s, box-shadow .2s;
    color: #333;
}
.login-form .form-control:focus {
    border-color: var(--main);
    box-shadow: 0 0 0 3px var(--main-focus);
    outline: none;
}

/* Nút đăng ký (LinkButton dạng btn) */
.form-control.btn {
    margin: 10px 0 0;
    padding: 13px 0;
    height: auto;
    background: var(--main);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    transition: background .2s;
    letter-spacing: 0.3px;
    display: block;
    width: 100%;
    text-align: center;
}
.form-control.btn:hover { background: var(--main-dark); color: #fff; }

/* ============================================================
   Footer  (.footer)
   ============================================================ */
.footer {
    text-align: center;
    width: 100%;
    color: #999;
    font-size: 13px;
    padding: 14px 0;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}
.footer a { color: var(--main); }

/* ============================================================
   Backward-compat — các class cũ được giữ lại
   ============================================================ */
.container          { position: relative; z-index: 1; max-width: 1200px; margin: auto; }
.bg-title           { display: none; }    /* không dùng trong layout mới */
.bg-design          { display: none; }    /* không dùng trong layout mới */
.container .content { width: 100%; max-width: 500px; margin: auto; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
    .login-form {
        padding: 32px 22px 28px;
        border-radius: 10px;
    }
    .login-form h2,
    .login-form .title { font-size: 18px; }
    .login-main { padding: 20px 12px; }
    .tophead-inner { padding: 0 16px; }
    .logo-brand { font-size: 22px; }
    .btn-back   { padding: 6px 12px; font-size: 13px; }
}

@media (max-width: 1023px) {
    .login-form { margin-top: 0; }
}

@media (max-width: 767px) {
    .login-form { padding: 28px 18px; }
    .footer     { font-size: 12px; }
    .login-main { padding: 24px 10px; }
}
