/* ===== PTK MASTER — giao diện chung (dark mode xanh đen) ===== */
:root {
  --bg: #040a1c;
  --bg-2: #07122e;
  --panel: rgba(9, 22, 60, .58);
  --panel-solid: #0b1a42;
  --line: rgba(110, 160, 240, .30);
  --line-strong: rgba(90, 170, 255, .65);
  --text: #eaf2ff;
  --text-2: #b9c9ea;
  --muted: #8195c0;
  --blue: #1e86ff;
  --blue-2: #2bb7ff;
  --cyan: #3fd6ff;
  --purple: #8d5bff;
  --green: #1fca8c;
  --red: #ff5a6e;
  --glow: 0 0 28px rgba(40, 140, 255, .35);
  --radius: 10px;
  --font: 'Be Vietnam Pro', system-ui, 'Segoe UI', sans-serif;
  --font-display: 'Montserrat', 'Be Vietnam Pro', system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; }
.t-white { color: #fff; }
.t-cyan {
  background: linear-gradient(180deg, #7fe9ff 0%, #34c6ff 45%, #1d86ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Logo thương hiệu ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(50, 190, 255, .55)); }
.brand__name { font-family: var(--font-display); font-weight: 900; font-size: 30px; line-height: 1; letter-spacing: .01em; }
.brand__name span { color: #fff; }
.brand__name b { color: var(--blue-2); font-weight: 900; }
.brand__tag { margin-top: 7px; font-size: 13px; letter-spacing: .06em; color: #a9c4f2; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; border-radius: 9px; border: 1px solid transparent;
  transition: filter .15s, box-shadow .15s, background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .link:focus-visible, .field__eye:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn--primary {
  height: 58px; font-size: 21px; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #1473ff 0%, #1f9bff 55%, #2cc0ff 100%);
  border-color: rgba(140, 215, 255, .6);
  box-shadow: 0 6px 26px rgba(20, 130, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary .ic { width: 28px; height: 28px; }
.btn--primary:hover { filter: brightness(1.08); box-shadow: 0 8px 32px rgba(20, 150, 255, .6), inset 0 1px 0 rgba(255,255,255,.3); }
.btn--primary:disabled { filter: saturate(.6) brightness(.85); cursor: progress; }
.btn--ghost {
  height: 50px; font-size: 16px; font-weight: 500; color: var(--text);
  background: rgba(10, 25, 65, .35); border-color: rgba(120, 170, 255, .5);
}
.btn--ghost:hover { background: rgba(30, 80, 170, .3); border-color: var(--line-strong); }
.btn--sm { height: 44px; font-size: 15px; width: auto; padding: 0 22px; }
.link { background: none; border: 0; padding: 0; color: var(--blue-2); font-size: 16px; }
.link:hover { color: var(--cyan); text-decoration: underline; }

/* =================================================================
   MÀN ĐĂNG NHẬP
   ================================================================= */
.page-login { min-height: 100vh; overflow-x: hidden; position: relative; }
.login-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 22% 45%, rgba(3, 8, 28, .78), transparent 70%),
    linear-gradient(90deg, rgba(3, 8, 26, .78) 0%, rgba(3, 8, 26, .45) 42%, rgba(3, 8, 26, .05) 70%),
    url('/static/img/nen.webp') center / cover no-repeat,
    var(--bg);
}
.brand--login { position: absolute; top: 34px; left: 40px; z-index: 2; }

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 530px minmax(200px, 15vw);
  align-items: center;
  gap: 3.2vw;
  padding: 110px 0 70px 5.6vw;
}
.login-card-wrap { grid-column: 2; }

/* --- Cột giới thiệu bên trái --- */
.hero { max-width: 700px; }
.hero__eyebrow {
  margin: 0 0 6px; font-size: clamp(20px, 2vw, 34px); font-weight: 400; white-space: nowrap;
  letter-spacing: .32em; color: #9fc3ff;
}
.hero__title {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(48px, 5.1vw, 92px); line-height: .98; letter-spacing: -.01em; white-space: nowrap;
  filter: drop-shadow(0 0 22px rgba(40, 150, 255, .35));
}
.hero__sub { margin: 18px 0 30px; font-size: clamp(16px, 1.5vw, 25px); line-height: 1.5; color: #e4ecff; }
.hero__sub i, .login-foot i { font-style: normal; color: var(--blue-2); margin: 0 4px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 680px; }
.feat {
  --c: var(--blue);
  text-align: center; padding: 16px 14px 20px; border-radius: 12px;
  border: 1.5px solid color-mix(in srgb, var(--c) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(6, 14, 40, .6));
  box-shadow: 0 0 22px color-mix(in srgb, var(--c) 22%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 10%, transparent);
  backdrop-filter: blur(4px);
}
.feat--purple { --c: var(--purple); }
.feat--green { --c: var(--green); }
.feat__icon {
  width: 66px; height: 66px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 14px;
  color: #fff; border: 1px solid color-mix(in srgb, var(--c) 80%, #fff 20%);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 85%, #fff 10%), color-mix(in srgb, var(--c) 55%, #000 30%));
  box-shadow: 0 0 20px color-mix(in srgb, var(--c) 55%, transparent);
}
.feat__icon .ic { width: 36px; height: 36px; }
.feat--green .feat__icon .ic, .feat--purple .feat__icon .ic { stroke-width: 2; }
.feat h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.feat p { margin: 0; font-size: 16px; color: var(--text-2); line-height: 1.4; }

.quote {
  margin: 34px 0 0 118px; max-width: 460px; padding: 18px 26px 16px; text-align: center;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 20, 55, .45);
}
.quote blockquote { margin: 0; font-size: 19px; font-style: italic; color: #e0e9ff; }
.quote .q { font-family: Georgia, serif; font-size: 40px; font-weight: 700; font-style: normal; color: var(--blue-2); line-height: 0; vertical-align: -12px; }
.quote figcaption { margin-top: 14px; padding-top: 14px; font-size: 14px; letter-spacing: .06em; color: #9fb6e6; position: relative; }
.quote figcaption::before { content: ''; position: absolute; top: 0; left: 50%; width: 44px; height: 2px; margin-left: -22px; background: var(--blue-2); box-shadow: 0 0 8px var(--blue-2); }

/* --- Thẻ đăng nhập --- */
.login-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 38px 48px 26px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 34, 90, .62), rgba(6, 16, 48, .72));
  border: 1.5px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(60, 150, 255, .12), 0 0 46px rgba(30, 130, 255, .38), inset 0 0 40px rgba(40, 120, 255, .10);
  backdrop-filter: blur(10px);
}
.login-card__lock {
  width: 90px; height: 88px; margin: 0 auto 4px; display: grid; place-items: center; border-radius: 14px;
  color: #fff; background: linear-gradient(160deg, #3a7bff, #1a3fae);
  border: 1.5px solid rgba(140, 200, 255, .8); box-shadow: 0 0 26px rgba(60, 140, 255, .65);
}
.login-card__lock .ic { width: 44px; height: 44px; }
.login-card__pre { margin: 0; text-align: center; font-size: 20px; color: #dbe6ff; }
.login-card__title {
  margin: -4px 0 0; text-align: center; font-family: var(--font-display); font-weight: 900;
  font-size: 52px; line-height: 1.05; letter-spacing: -.01em;
}
.login-card__hint { margin: -4px 0 14px; text-align: center; font-size: 20px; color: #d3def7; }

.form-error {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 9px;
  background: rgba(255, 70, 95, .12); border: 1px solid rgba(255, 90, 110, .55); color: #ffd3da; font-size: 15px;
}
.form-error .ic { color: var(--red); margin-top: 1px; }

.field { position: relative; display: block; }
.field input {
  width: 100%; height: 58px; padding: 0 54px 0 64px; border-radius: 9px; font-size: 17px;
  background: rgba(6, 16, 46, .62); border: 1px solid rgba(130, 165, 230, .38); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: #8ea0c8; }
.field input:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(43, 183, 255, .18), 0 0 18px rgba(43, 183, 255, .25); }
.field__icon { position: absolute; left: 20px; top: 50%; width: 26px; height: 26px; margin-top: -13px; color: #b7c6e6; pointer-events: none; }
.field__eye {
  position: absolute; right: 10px; top: 50%; width: 40px; height: 40px; margin-top: -20px;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: #b7c6e6;
}
.field__eye:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.field__eye .ic { width: 24px; height: 24px; }
.field__eye .eye-hide, .field__eye.is-on .eye-show { display: none; }
.field__eye.is-on .eye-hide { display: block; }

.login-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 6px; }
.check { display: inline-flex; align-items: center; gap: 12px; font-size: 16px; cursor: pointer; user-select: none; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--blue); cursor: pointer; }

.login-card .btn--ghost { margin-top: 6px; }
.login-card__ver { display: flex; align-items: center; gap: 16px; margin-top: 18px; color: #a9badd; font-size: 15px; }
.login-card__ver::before, .login-card__ver::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(130, 170, 240, .45), transparent); }

/* --- Nhãn nổi quanh quả địa cầu --- */
.float-tags { position: absolute; top: 0; right: 0; width: 20vw; height: 100%; pointer-events: none; }
.ftag {
  position: absolute; right: 2.4vw; padding: 12px 18px; font-size: 15px; line-height: 1.35; letter-spacing: .04em; color: #cfe3ff;
  border: 1px solid rgba(110, 180, 255, .55); border-radius: 4px; background: rgba(20, 60, 150, .25);
  box-shadow: 0 0 18px rgba(40, 140, 255, .25); backdrop-filter: blur(3px);
  transform: perspective(700px) rotateY(-22deg) rotateZ(-7deg);
}
.ftag--1 { top: 17%; }
.ftag--2 { top: 38%; right: 3.4vw; transform: perspective(700px) rotateY(-18deg) rotateZ(4deg); }
.ftag--3 { top: 62%; right: 1.8vw; transform: perspective(700px) rotateY(-22deg) rotateZ(7deg); }

.login-foot { position: absolute; left: 36px; bottom: 34px; font-size: 16px; color: #c5d3f0; }
.status-pill {
  position: fixed; right: 28px; bottom: 26px; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 10px; font-size: 13px; color: #dbe6ff;
  background: rgba(8, 20, 55, .7); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* --- Hộp thông báo --- */
.modal {
  width: min(440px, calc(100vw - 32px)); padding: 24px; border-radius: 16px; color: var(--text);
  background: linear-gradient(180deg, #0f2560, #081636); border: 1.5px solid var(--line-strong); box-shadow: var(--glow);
}
.modal::backdrop { background: rgba(2, 6, 20, .7); backdrop-filter: blur(3px); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; }
.modal h3 .ic { color: var(--blue-2); }
.modal p { margin: 14px 0 20px; color: var(--text-2); font-size: 16px; }
.modal__x { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--text-2); }
.modal__x:hover { background: rgba(255, 255, 255, .07); color: #fff; }

/* --- Màn hình nhỏ hơn --- */
@media (max-width: 1440px) {
  .login-layout { grid-template-columns: minmax(0, 1fr) 490px minmax(150px, 12vw); gap: 3vw; }
  .login-card { padding: 32px 38px 22px; }
  .login-card__title { font-size: 46px; }
  .quote { margin-left: 60px; }
  .ftag { font-size: 13px; padding: 10px 14px; }
}
@media (max-width: 1400px) {
  .float-tags { display: none; }
  .login-layout { grid-template-columns: minmax(0, 1fr) 460px; padding-right: 4vw; }
  .features { gap: 12px; }
  .feat h3 { font-size: 16px; }
  .feat p { font-size: 14px; }
  .quote { margin-left: 0; }
}
/* Màn hình thấp (laptop 768–860px chiều cao): thu gọn để không phải cuộn */
@media (max-height: 880px) and (min-width: 961px) {
  .brand--login { top: 22px; }
  .login-layout { padding-top: 92px; padding-bottom: 44px; }
  .login-card { gap: 11px; padding: 26px 40px 16px; }
  .login-card__lock { width: 70px; height: 68px; }
  .login-card__lock .ic { width: 36px; height: 36px; }
  .login-card__pre, .login-card__hint { font-size: 17px; }
  .login-card__title { font-size: 40px; }
  .login-card__hint { margin-bottom: 6px; }
  .field input { height: 50px; }
  .btn--primary { height: 52px; font-size: 19px; }
  .btn--ghost { height: 44px; }
  .login-card__ver { margin-top: 8px; }
  .hero__sub { margin: 12px 0 22px; }
  .feat { padding: 12px 12px 14px; }
  .feat__icon { width: 54px; height: 54px; margin-bottom: 8px; }
  .feat__icon .ic { width: 30px; height: 30px; }
  .quote { margin-top: 22px; padding: 12px 20px; }
  .quote figcaption { margin-top: 10px; padding-top: 10px; }
  .login-foot { bottom: 18px; }
  .status-pill { bottom: 14px; }
}
@media (max-width: 960px) {
  .hero { display: none; }
  .login-layout { grid-template-columns: minmax(0, 480px); justify-content: center; padding: 120px 16px 90px; }
  .login-card-wrap { grid-column: 1; }
  .login-foot { left: 50%; transform: translateX(-50%); white-space: nowrap; bottom: 70px; }
}
@media (max-width: 560px) {
  .brand--login { left: 16px; top: 20px; }
  .brand__mark { width: 44px; height: 44px; }
  .brand__name { font-size: 25px; }
  .brand__tag { font-size: 11px; }
  .login-layout { padding: 96px 16px 110px; }
  .login-card { padding: 26px 20px 18px; border-radius: 18px; }
  .login-card__lock { width: 70px; height: 68px; }
  .login-card__lock .ic { width: 36px; height: 36px; }
  .login-card__pre, .login-card__hint { font-size: 17px; }
  .login-card__title { font-size: 38px; }
  .check, .link { font-size: 14px; white-space: nowrap; }
  .check { gap: 8px; }
  .check input { width: 20px; height: 20px; }
  .status-pill { position: absolute; right: 50%; transform: translateX(50%); bottom: 18px; white-space: nowrap; }
}
