/* =============================================
   Plugin Đăng Nhập – Trang Bảo Trì
   Inspired by Lavish Time password page
   ============================================= */

/* ── Reset cơ bản ── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    padding: 0;
    margin: 0;
    height: 100%;
}

body, input, textarea, button, select {
    font-size: 16px;
    line-height: 1.7;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
    margin: 0 0 15px;
    line-height: 1.4;
}

.h2 { font-size: 1.75em; }
.h4 { font-size: 1.125em; }

p { margin: 0 0 15px; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.85; }

hr {
    clear: both;
    border-top: solid;
    border-width: 1px 0 0;
    margin: 0 auto;
    height: 0;
    max-width: 60px;
    padding: 15px 0;
    border-color: inherit;
}

/* ── Layout toàn trang (display table như Lavish Time) ── */
.template-password {
    height: 100vh;
    text-align: center;
    background-color: #1a1a2e;
}

.password-page__wrapper {
    display: table;
    height: 100%;
    width: 100%;
    color: #ffffff;
    background-color: #1a1a2e;
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
}

.password-page__wrapper a { color: inherit; }
.password-page__wrapper hr { border-color: rgba(255,255,255,0.4); }

/* ── Header ── */
.password-page__header {
    display: table-row;
    height: 1px;
}

.password-page__header__inner {
    display: table-cell;
    padding: 15px 30px;
}

/* Nút mật khẩu góc phải */
.password-login {
    margin-top: 15px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 0.875em;
    line-height: 14px;
}

.password-login a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.2s;
    cursor: pointer;
}

.password-login a:hover { opacity: 1; }

.lock-icon-svg {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: baseline;
    flex-shrink: 0;
}

.lock-icon-svg path { fill: currentColor; }

/* Logo / Tên thương hiệu */
.password-page__logo {
    margin-top: 90px;
    color: inherit;
}

.password-page__logo .logo {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.password-page__logo h1 {
    font-size: 2em;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Nội dung chính ── */
.password-page__main {
    display: table-row;
    width: 100%;
    height: 100%;
}

.password-page__main__inner {
    display: table-cell;
    vertical-align: middle;
    padding: 15px 30px;
}

/* Tiêu đề lớn */
.password-page__hero {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: 2.625em;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
}

@media screen and (min-width: 481px) {
    .password-page__hero { font-size: 3.75em; }
}

@media screen and (min-width: 769px) {
    .password-page__hero { font-size: 4em; }
}

/* Thông báo */
.password-page__message {
    font-style: italic;
    font-size: 120%;
    max-width: 500px;
    margin: 0 auto;
}

.password-page__message,
.password-page__login-form,
.password-page__signup-form {
    max-width: 500px;
    margin: 0 auto;
}

/* Khu vực Zalo */
.password-page__signup-form {
    padding: 0 30px;
}

.pdn-zalo-link {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: #4fc3f7 !important;
    text-decoration: none;
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.pdn-zalo-link:hover {
    color: #81d4fa;
    border-color: rgba(129,212,250,0.6);
}

.pdn-zalo-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
    display: block;
}

/* ── Footer ── */
.password-page__footer {
    display: table-row;
    height: 1px;
    color: inherit;
}

.password-page__footer_inner {
    display: table-cell;
    vertical-align: bottom;
    padding: 30px;
    font-size: 95%;
    opacity: 0.6;
}

/* ── Utility ── */
.text-right  { text-align: right !important; }
.text-center { text-align: center !important; }

@media only screen and (max-width: 480px) {
    .small--text-center { text-align: center !important; }
    .password-page__header__inner { padding: 12px 15px; }
    .password-page__logo { margin-top: 30px; }
    .password-page__main__inner { padding: 15px; }
}

/* ══════════════════════════════════════════
   MODAL BACKDROP
══════════════════════════════════════════ */
.pdn-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pdn-modal-backdrop.pdn-open {
    opacity: 1;
    visibility: visible;
}

/* ══════════════════════════════════════════
   POPUP FORM (giống .mfp-content của Lavish Time)
══════════════════════════════════════════ */
#LoginModal {
    background: #fff;
    border-radius: 4px;
    padding: 36px 40px 32px;
    width: 100%;
    max-width: 480px;
    position: relative;
    color: #333;
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.pdn-modal-backdrop.pdn-open #LoginModal {
    transform: scale(1) translateY(0);
}

/* Nút đóng */
.pdn-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.pdn-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

/* Tiêu đề popup */
#LoginModal .h4 {
    font-size: 1em;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Input group (giống Lavish Time) */
.input-group {
    position: relative;
    display: table;
    border-collapse: separate;
    width: 100%;
    margin-bottom: 12px;
}

.input-group-field,
.input-group-btn {
    display: table-cell;
    vertical-align: middle;
    margin: 0;
}

.input-group-field {
    width: 100%;
    height: 40px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 2px 0 0 2px;
    font-size: 1em;
    font-family: inherit;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    margin: 0;
    display: table-cell;
}

.input-group-field:focus {
    border-color: #aaa;
}

.input-group-field::placeholder { color: #aaa; }

.input-group-btn {
    white-space: nowrap;
    width: 1%;
    padding: 0;
}

.btn,
.password-page__login-form__submit {
    display: inline-block;
    height: 40px;
    padding: 0 16px;
    margin: 0;
    font-size: 0.9em;
    font-family: inherit;
    font-weight: 400;
    line-height: 40px;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 0 2px 2px 0;
    background-color: #f45b4f;
    color: #fff;
    transition: background-color 0.15s ease-in;
    -webkit-appearance: none;
    vertical-align: middle;
}

.btn:hover,
.password-page__login-form__submit:hover {
    background-color: #f7887f;
    color: #fff;
}

.btn:disabled,
.password-page__login-form__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Loading state */
#pdn-btn-loading {
    display: inline-block;
    letter-spacing: 2px;
}

/* Alert trong popup */
.pdn-alert {
    border-radius: 2px;
    padding: 8px 12px;
    margin-bottom: 14px;
    font-size: 0.88em;
    text-align: left;
    border: 1px solid transparent;
}

.pdn-alert-error {
    background: #fff6f6;
    color: #d02e2e;
    border-color: #d02e2e;
}

.pdn-alert-success {
    background: #ecfef0;
    color: #56ad6a;
    border-color: #56ad6a;
}

.pdn-alert-warning {
    background: #fffbeb;
    color: #856404;
    border-color: #ffc107;
}

/* Admin login link */
.admin-login {
    margin-top: 15px;
    font-size: 0.85em;
    color: #666;
}

.admin-login a {
    color: #f45b4f;
}

.admin-login a:hover { color: #f7887f; }

/* ── Responsive ── */
@media only screen and (max-width: 480px) {
    #LoginModal {
        padding: 28px 20px 24px;
    }
}
