/* ==========================================================================
   New Post Express — Login (Enterprise SaaS redesign)
   Scoped entirely under body.login-v2 so it never leaks into other pages.
   ========================================================================== */

body.login-v2 {
  --np-primary: #D91F26;
  --np-primary-dark: #B8181F;
  --np-primary-light: #FCE8E9;
  --np-bg: #F7F8FA;
  --np-border: #E5E7EB;
  --np-text: #1F2937;
  --np-subtitle: #6B7280;
  --np-success: #16A34A;
  --np-radius-lg: 28px;
  --np-radius-md: 16px;
  --np-radius-sm: 10px;
  --np-shadow-lg: 0 24px 60px -20px rgba(17, 24, 39, .18);
  --np-shadow-sm: 0 2px 10px rgba(17, 24, 39, .06);

  background: var(--np-bg) !important;
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--np-text);
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

body.login-v2 * {
  box-sizing: border-box;
}

body.login-v2 a {
  text-decoration: none;
}

/* ---------------------------------------------------------------------- */
/* Shell                                                                   */
/* ---------------------------------------------------------------------- */

.login-v2-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  padding: 28px;
  gap: 0;
  animation: npFadeIn .5s ease both;
}

@keyframes npFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-v2-frame {
  display: flex;
  width: 100%;
  background: #fff;
  border-radius: var(--np-radius-lg);
  box-shadow: var(--np-shadow-lg);
  overflow: hidden;
}

/* ---------------------------------------------------------------------- */
/* Left — marketing panel (58%)                                           */
/* ---------------------------------------------------------------------- */

.login-visual {
  flex: 0 0 58%;
  max-width: 58%;
  position: relative;
  background-color: #E9EBF0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-right: 1px solid var(--np-border);
}

.login-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .55) 32%, rgba(255, 255, 255, .18) 60%, rgba(255, 255, 255, .35) 100%);
}

.login-visual-body {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 48px 56px 40px;
  display: flex;
  flex-direction: column;
}

.login-visual-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 36px;
}

.login-visual-logo img {
  height: 128px;
  width: auto;
  object-fit: contain;
}

.login-visual-title {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--np-text);
  margin: 100px 0 16px;
}

.login-visual-title .text-brand {
  color: var(--np-primary);
}

.login-visual-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--np-subtitle);
  max-width: 480px;
  margin: 0 0 28px;
}

.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 520px;
  margin-bottom: 32px;
}

.login-feature-card {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: var(--np-radius-md);
  box-shadow: var(--np-shadow-sm);
  padding: 18px 14px;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}

.login-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(17, 24, 39, .15);
}

.login-feature-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: var(--np-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--np-primary);
}

.login-feature-icon svg {
  width: 22px;
  height: 22px;
}

.login-feature-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--np-text);
  line-height: 1.35;
}

.login-stats {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: var(--np-radius-md);
  box-shadow: var(--np-shadow-sm);
  padding: 18px 28px;
}

.login-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
}

.login-stat-divider {
  width: 1px;
  align-self: stretch;
  background: var(--np-border);
}

.login-stat-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--np-primary-light);
  color: var(--np-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-stat-icon svg {
  width: 18px;
  height: 18px;
}

.login-stat-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--np-text);
  line-height: 1.2;
}

.login-stat-label {
  font-size: 11.5px;
  color: var(--np-subtitle);
  line-height: 1.3;
}

/* ---------------------------------------------------------------------- */
/* Right — login card (42%)                                               */
/* ---------------------------------------------------------------------- */

.login-panel {
  flex: 0 0 42%;
  max-width: 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.login-panel-logo {
  display: none;
  text-align: center;
  margin-bottom: 24px;
}

.login-panel-logo img {
  height: 60px;
  width: auto;
}

.login-v2 .content {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  padding: 46px 0 0;
  margin: 0;
}

.login-v2-lang {
  position: absolute;
  top: 0;
  right: 0;
}

.login-v2-lang-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 32px 0 12px;
  background: #fff;
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-sm);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.login-v2-lang-trigger:hover {
  border-color: #D1D5DB;
}

.login-v2-lang.open .login-v2-lang-trigger,
.login-v2-lang-trigger:focus-visible {
  outline: none;
  border-color: var(--np-primary);
  box-shadow: 0 0 0 3px rgba(217, 31, 38, .12);
}

.login-v2-lang-flag {
  flex: 0 0 auto;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, .08);
}

.login-v2-lang-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.login-v2-lang-trigger .login-v2-lang-flag svg {
  display: none;
}

.login-v2-lang[data-lang="vi"] .login-v2-lang-trigger .login-v2-lang-flag svg[data-flag="vi"],
.login-v2-lang[data-lang="en"] .login-v2-lang-trigger .login-v2-lang-flag svg[data-flag="en"] {
  display: block;
}

.login-v2-lang-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--np-text);
  white-space: nowrap;
}

.login-v2-lang-text span {
  display: none;
}

.login-v2-lang[data-lang="vi"] .login-v2-lang-text span[data-text="vi"],
.login-v2-lang[data-lang="en"] .login-v2-lang-text span[data-text="en"] {
  display: inline;
}

.login-v2-lang-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 10px;
  height: 6px;
  pointer-events: none;
  transition: transform .2s ease;
}

.login-v2-lang.open .login-v2-lang-caret {
  transform: translateY(-50%) rotate(180deg);
}

.login-v2-lang-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 172px;
  background: #fff;
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-sm);
  box-shadow: var(--np-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 20;
}

.login-v2-lang.open .login-v2-lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.login-v2-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--np-text);
  cursor: pointer;
  transition: background-color .15s ease;
}

.login-v2-lang-option:hover {
  background: var(--np-bg);
}

.login-v2-lang[data-lang="vi"] .login-v2-lang-option[data-lang="vi"],
.login-v2-lang[data-lang="en"] .login-v2-lang-option[data-lang="en"] {
  background: var(--np-primary-light);
  font-weight: 600;
}

.login-v2-lang-native {
  display: none;
}

.login-v2 .form-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--np-text) !important;
  margin: 0 0 6px;
}

.login-v2-subtitle {
  font-size: 14.5px;
  color: var(--np-subtitle);
  margin: 0 0 28px;
}

.login-v2 .form-group {
  margin-bottom: 18px;
}

.login-v2 .control-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--np-text);
  margin-bottom: 7px;
}

.login-v2 .input-icon {
  position: relative;
  border-left: 0 !important;
  border-radius: var(--np-radius-sm) !important;
}

.login-v2 .input-icon > i {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  width: 44px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: #9CA3AF !important;
  font-weight: 400 !important;
  z-index: 2;
  pointer-events: none;
  float: none;
}

.login-v2 .input-icon > i.fa-eye,
.login-v2 .input-icon > i.fa-eye-slash {
  left: auto;
  right: 0;
  pointer-events: auto;
  cursor: pointer;
}

.login-v2 .form-control {
  height: 52px;
  width: 100%;
  padding: 0 16px 0 44px;
  font-size: 14.5px;
  color: var(--np-text);
  background: #fff;
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-sm);
  box-shadow: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.login-v2 .input-icon > .form-control {
  padding-left: 44px;
  padding-right: 16px;
}

#frmlgons .input-icon > .form-control {
  padding-right: 44px;
}

.login-v2 .form-control::placeholder {
  color: #9CA3AF;
}

.login-v2 .form-control:focus {
  outline: none;
  border-color: var(--np-primary);
  box-shadow: 0 0 0 4px rgba(217, 31, 38, .1);
}

.login-v2 .help-block {
  font-size: 13px;
  margin-top: 8px;
}

/* department toggle + custom dropdown */
.login-v2 .department-toggle {
  margin-bottom: 12px;
}

.login-v2 .phongBan .lphongban {
  position: relative;
}

.login-v2 select.cbbPhongBan {
  display: none;
}

.pb-dropdown {
  position: relative;
}

.pb-dropdown-trigger {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  color: var(--np-text);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.pb-dropdown-trigger:hover {
  border-color: #D1D5DB;
}

.pb-dropdown.open .pb-dropdown-trigger,
.pb-dropdown-trigger:focus-visible {
  outline: none;
  border-color: var(--np-primary);
  box-shadow: 0 0 0 4px rgba(217, 31, 38, .1);
}

.pb-dropdown-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pb-dropdown-text.is-placeholder {
  color: #9CA3AF;
}

.pb-dropdown-caret {
  flex: 0 0 auto;
  width: 10px;
  height: 6px;
  transition: transform .2s ease;
}

.pb-dropdown.open .pb-dropdown-caret {
  transform: rotate(180deg);
}

.pb-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--np-border);
  border-radius: var(--np-radius-sm);
  box-shadow: var(--np-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 15;
}

.pb-dropdown.open .pb-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pb-dropdown-option {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--np-text);
  cursor: pointer;
  transition: background-color .15s ease;
}

.pb-dropdown-option:hover {
  background: var(--np-bg);
}

.pb-dropdown-option.active {
  background: var(--np-primary-light);
  font-weight: 600;
}

.pb-dropdown-option.is-placeholder-option {
  color: #9CA3AF;
  font-style: italic;
}

/* checkboxes / options row */
.login-v2 .form-actions {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 4px 0 0;
}

.login-v2 .options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.login-v2 label.mt-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding-left: 26px;
  font-size: 13.5px;
  color: var(--np-text);
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}

.login-v2 label.mt-checkbox input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.login-v2 label.mt-checkbox span {
  display: block;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: #fff;
  border: 1.5px solid var(--np-border);
  border-radius: 5px;
  transition: background-color .15s ease, border-color .15s ease;
}

.login-v2 label.mt-checkbox span::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity .12s ease;
}

.login-v2 label.mt-checkbox input[type="checkbox"]:checked ~ span {
  background: var(--np-primary);
  border-color: var(--np-primary);
}

.login-v2 label.mt-checkbox input[type="checkbox"]:checked ~ span::after {
  opacity: 1;
}

.login-v2 label.mt-checkbox input[type="checkbox"]:focus-visible ~ span {
  box-shadow: 0 0 0 3px rgba(217, 31, 38, .15);
}

.login-v2 label.mt-checkbox:hover span {
  border-color: #C7CCD6;
}

.login-v2 label.mt-checkbox input[type="checkbox"]:disabled {
  cursor: not-allowed;
}

.login-v2 label.mt-checkbox input[type="checkbox"]:disabled ~ span {
  background: var(--np-bg);
  border-color: var(--np-border);
}

.login-v2 label.mt-checkbox:has(input:disabled) {
  cursor: not-allowed;
  color: #9CA3AF;
}

.login-v2 .forgot-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--np-primary);
  transition: color .2s ease;
}

.login-v2 .forgot-link:hover {
  color: var(--np-primary-dark);
  text-decoration: underline;
}

/* submit button */
.login-v2 .form-actions .btn.red {
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: #fff;
  border: 0;
  border-radius: var(--np-radius-sm);
  background: linear-gradient(135deg, var(--np-primary) 0%, #F0353C 100%);
  box-shadow: 0 10px 24px -8px rgba(217, 31, 38, .45);
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
  float: none;
  margin: 0;
}

.login-v2 .form-actions .btn.red:hover {
  filter: brightness(1.07);
  box-shadow: 0 14px 28px -8px rgba(217, 31, 38, .5);
}

.login-v2 .form-actions .btn.red:active {
  transform: translateY(1px);
}

.login-v2 #btnlogin::after {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3Cpolyline points='12 5 19 12 12 19'/%3E%3C/svg%3E") no-repeat center / contain;
}

.login-v2 .create-account,
.login-v2 .forget-password {
  border: 0;
  margin: 0;
  padding: 0;
}

.login-v2 .forget-password {
  display: none; /* merged into options-row as .forgot-link */
}

.login-v2 .create-account {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--np-border);
  text-align: center;
}

.login-v2 .create-account p {
  margin: 0;
  font-size: 13.5px;
  color: var(--np-subtitle);
}

.login-v2 .create-account a {
  color: var(--np-primary);
  font-weight: 600;
}

.login-v2-links {
  max-width: 440px;
  width: 100%;
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 12.5px;
  color: var(--np-subtitle);
}

.login-v2-links a {
  color: var(--np-subtitle);
}

.login-v2-links a:hover {
  color: var(--np-primary);
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.login-v2-footer {
  text-align: center;
  padding: 16px 10px 4px;
  font-size: 12.5px;
  color: var(--np-subtitle);
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 1199px) {
  .login-visual-title { font-size: 32px; }
}

@media (max-width: 991px) {
  .login-visual-body { padding: 40px 36px 32px; }
  .login-visual-title { margin-top: 72px; }
  .login-feature-grid { gap: 10px; }
  .login-feature-label { font-size: 12px; }
  .login-stats { gap: 14px; padding: 14px 16px; }
}

@media (max-width: 767px) {
  .login-v2-shell { padding: 0; }
  .login-v2-frame { border-radius: 0; box-shadow: none; }
  .login-visual { display: none; }
  .login-panel { flex: 0 0 100%; max-width: 100%; padding: 40px 16px; flex-direction: column; }
  .login-panel-logo { display: block; position: static; text-align: center; margin-bottom: 24px; }
  .login-panel-logo img { height: 120px; }
  .login-v2 .content { max-width: 92%; margin: 0 auto; }
  .login-v2-lang { position: relative; display: flex; justify-content: flex-end; margin: 0 0 16px; }
  .login-v2 .form-title { font-size: 22px; }
}
