﻿/* ══════════════════════════════════════════════════════════
   LOGIN — Giao diện đăng nhập hiện đại (Modern Redesign)
   Loaded by: tpl/default/login.tpl
   ══════════════════════════════════════════════════════════ */
html, body {
    height: 100%;
}

body.LoginTheme.BoxDialog {
    min-height: 100vh;
    overflow-y: auto; /* Cho phép cuộn dọc khi cần */
}
/* Login dark theme — variables riêng, không dùng --sc-* (dark bg vs light bg) */
:root {
    --primary:       #ff4d6d;
    --primary-dark:  #c9184a;
    --bg-outer:      #020517;
    --bg-inner:      #080c1f;
    --card-bg:       #0b1022;
    --border-soft:   rgba(255, 255, 255, 0.06);
    --text:          #f9fafb;
    --muted:         #a5b0d1;
    --error-bg:      #ff4d6d22;
    --error-border:  #ff4d6dcc;
    --radius-card:   26px;
    --radius-input:  12px;
    --shadow-card:   0 22px 45px rgba(0, 0, 0, 0.65);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.LoginTheme.BoxDialog {
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 0% 0%, #ff4d6d33 0, transparent 55%),
        radial-gradient(circle at 100% 100%, #ff6f6133 0, transparent 55%),
        linear-gradient(135deg, #020617, #050816 45%, #020617);
    color: var(--text);
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* Khung ngoài để căn giữa card */
#gradient {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    min-height: 100vh; /* luôn full chiều cao */
}

/* CARD CHÍNH */
.auth-shell {
    width: 100%;
    max-width: 1080px;
    background: var(--card-bg);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
}

/* BÊN TRÁI – FORM */
.auth-left {
    padding: 24px 26px 20px;
    background: radial-gradient(circle at top left, #ff4d6d33 0, transparent 60%), #050816;
    display: flex;
    flex-direction: column;
}

.auth-left-main {
    flex: 1;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.logo-wrap img {
    height: 36px;
    width: auto;
}

.logo-text-main {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ffe6ef;
}

.logo-text-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: #ffc2d1;
    margin-top: 2px;
}

.ribbon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff4d6d33, #ff6f6133);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffe6ef;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 16px;
}

.ribbon-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.auth-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 13px;
    color: #f3c5d5;
    margin-bottom: 18px;
}

/* ERROR */
.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 13px;
    color: #ffe6ef;
    margin-bottom: 14px;
}

.alert-error ul {
    margin-top: 6px;
    margin-left: 20px;
}

.alert-error li {
    margin-bottom: 2px;
}

/* FORM FIELD */
.field-group {
    margin-bottom: 14px;
}

.field-label {
    font-size: 13px;
    margin-bottom: 6px;
}

.field-label span {
    color: #fb7185;
}

.input-wrap {
    position: relative;
}

.InputTextStyle {
    width: 100%;
    height: 50px;
    padding: 10px 12px 10px 34px;
    border-radius: var(--radius-input);
    border: 1px solid var(--border-soft);
    background: #050815;
    color: var(--sc-border);
    outline: none;
    font-size: 13px;
}

.InputTextStyle::placeholder {
    color: var(--sc-text-sub);
}

.InputTextStyle:focus {
    border-color: var(--primary);
    background: #070b1a;
    box-shadow: 0 0 0 1px #ff4d6d66;
}

.input-icon {
    position: absolute;
    left: 11px;
    top: 24px;
    transform: translateY(-50%);
    opacity: .8;
    font-size: 15px;
}

/* BUTTON */
#btn_login {
    width: 100%;
    height: 60px;
    padding: 11px;
    border-radius: 999px;
    border: none;
    outline: none;
    margin-top: 10px;
    background: linear-gradient(135deg, #ff4d6d, #f97373);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .16s ease-out;
}

#btn_login:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 12px 26px rgba(249, 115, 129, 0.55);
}

#btn_login:active {
    transform: translateY(0);
    box-shadow: none;
}

/* FOOTER TRONG CARD */
.TextCopyRight {
    margin-top: 20px;
    text-align: right;
    font-size: 11px;
    color: rgba(248, 250, 252, 0.6);
}

.TextCopyRight a {
    color: #fecaca;
    text-decoration: none;
}

.TextCopyRight a:hover {
    text-decoration: underline;
}

/* BÊN PHẢI – INFO PANEL */
.auth-right {
    padding: 22px 24px 20px;
    background: linear-gradient(135deg, #050816, #020617);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.badge-env {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #12172a;
    border: 1px solid #3f4866;
    color: var(--sc-border);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.badge-env-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
}

.hero-title {
    margin-top: 14px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
}

.hero-desc {
    margin-top: 8px;
    font-size: 12px;
    color: #d1d5db;
}

.hero-list {
    list-style: none;
    margin-top: 12px;
}

.hero-list li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 12px;
    color: var(--sc-border);
    margin-bottom: 5px;
}

.hero-list .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fb7185;
    margin-top: 5px;
}

.hero-footer {
    font-size: 11px;
    color: var(--sc-text-muted);
    margin-top: 16px;
}

/* RESPONSIVE */
@media (max-width: 880px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr); /* 1 cột, stack trên–dưới */
        max-width: 520px;
    }

    /* HIỂN THỊ LẠI PANEL THÔNG TIN Ở DƯỚI FORM */
    .auth-right {
        display: block;
        border-left: none;                 /* bỏ đường viền dọc cũ */
        border-top: 1px solid rgba(255,255,255,0.06);
        padding: 16px 18px 18px;
        margin-top: -120px;
    }
}

@media (max-width: 640px) {
    #gradient {
        padding: 16px 10px;
        min-height: auto;          /* Không ép 100vh trên mobile */
        align-items: flex-start;   /* Không căn giữa dọc nữa */
    }

    body.LoginTheme.BoxDialog {
        align-items: flex-start;   /* Không căn giữa dọc, để dễ cuộn */
    }

    .auth-left {
        padding: 20px 18px 18px;
    }
    .auth-shell {
        border-radius: 18px;
        margin-top: 16px;
        margin-bottom: 24px;       /* Tạo khoảng trống bên dưới để cuộn lên/xuống */
    }
    .auth-title {
        font-size: 20px;
    }
    .logo-text-main {
        font-size: 14px;
    }
    .auth-subtitle {
        font-size: 12px;
    }
}
