:root {
  --ts-navy-900: #0B2545;
  --ts-soft-blue: #EEF4FC;
  --ts-navy: #0D3B66;
  --ts-blue: #155E9C;
  --ts-blue-400: #4DA3FF;
  --ts-red: #DF1714;
  --ts-neutral-50: #F5F7FA;
  --ts-body: #374151;
  --ts-muted: #6B7280;
  --ts-line: #E5E9F0;
  --ts-shadow-lg: 0 12px 40px rgba(13, 59, 102, .12);
}

.ts-auth,
.ts-auth *,
.ts-auth *::before,
.ts-auth *::after {
  box-sizing: border-box;
}

body.ts-auth-page {
  margin: 0;
  overflow: hidden;
  background: var(--ts-neutral-50);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ts-body);
}
body.ts-auth-page .ts-auth {
  display: grid;
  grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  height: 100vh;
  height: 100dvh;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.ts-auth-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  background-color: #06182E;
  background-image: linear-gradient(180deg, rgba(6, 24, 46, 0.95) 0%, rgba(9, 30, 58, 0.88) 34%, rgba(9, 32, 62, 0.48) 62%, rgba(6, 24, 46, 0.12) 100%), url("../image/login-hero.webp");
  background-repeat: no-repeat, no-repeat;
  background-size: auto, cover;
  background-position: center, center bottom;
}
.ts-auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px 300px at 12% 88%, rgba(77, 163, 255, 0.18), transparent 65%);
}

.ts-auth-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 3.4vh, 2.75rem) clamp(1.5rem, 3.4vw, 3.25rem);
}

.ts-logo-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  align-self: flex-start;
  text-decoration: none;
}

.ts-logo-image {
  display: block;
  width: auto;
  height: clamp(70px, 8vh, 100px);
  margin-bottom: clamp(20px, 3.2vh, 36px);
}

.ts-logo {
  display: none;
  align-items: center;
  gap: 0.15rem;
  font-family: "Be Vietnam Pro", "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(21px, 1.9vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
}
.ts-logo .ts-flame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ts-red);
}
.ts-logo .ts-flame svg {
  width: 0.92em;
  height: 0.92em;
  display: block;
}
.ts-logo .ts-logo-ai {
  color: var(--ts-red);
  margin-left: 0.35rem;
}

.ts-logo-tag {
  display: none;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.ts-auth-hero__body {
  width: 100%;
  max-width: 560px;
  margin-top: clamp(1rem, 4.5vh, 2.5rem);
}

.ts-auth-hero__title {
  font-family: "Be Vietnam Pro", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.24;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0 0 0.55rem;
}

.ts-auth-hero__title-main,
.ts-auth-hero__title-flow {
  display: block;
}

.ts-auth-hero__title-flow {
  color: var(--ts-red);
  font-size: clamp(15px, 1.95vw, 27px);
  white-space: nowrap;
  letter-spacing: -0.005em;
  margin-top: 0.1rem;
}

.ts-auth-hero__lead {
  max-width: 100%;
  margin: 0 0 clamp(0.9rem, 2.4vh, 1.6rem);
  font-size: clamp(13.5px, 1.05vw, 15px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.ts-auth-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ts-auth-feature {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: clamp(0.45rem, 1.3vh, 0.85rem);
}
.ts-auth-feature:last-child {
  margin-bottom: 0;
}
.ts-auth-feature .ic {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ts-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(6, 24, 46, 0.35);
}
.ts-auth-feature .ic svg {
  width: 20px;
  height: 20px;
}
.ts-auth-feature .tx {
  display: block;
  padding-top: 2px;
}
.ts-auth-feature strong {
  display: block;
  font-family: "Be Vietnam Pro", "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.08rem;
}
.ts-auth-feature small {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.ts-auth-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: clamp(0.7rem, 2vh, 1.5rem) clamp(1rem, 2.4vw, 2rem);
  background: var(--ts-neutral-50);
}

.ts-auth-topbar {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.ts-auth-topbar__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--ts-line);
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ts-navy);
  text-decoration: none;
}
.ts-auth-topbar__link svg {
  width: 15px;
  height: 15px;
}
.ts-auth-topbar__link:hover {
  color: var(--ts-blue);
  border-color: var(--ts-blue);
}

.ts-auth-card {
  width: 100%;
  max-width: 520px;
  min-width: 0;
  margin: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--ts-shadow-lg);
  padding: clamp(1.3rem, 3vh, 2.15rem) clamp(1.4rem, 2.4vw, 2.35rem);
}
.ts-auth-card .block-page-title-block,
.ts-auth-card .block-local-tasks-block,
.ts-auth-card .block-local-actions-block,
.ts-auth-card .block-help-block,
.ts-auth-card .block-system-breadcrumb-block,
.ts-auth-card nav.tabs,
.ts-auth-card .region-breadcrumb {
  display: none;
}
.ts-auth-card .block {
  margin: 0;
}

.ts-auth-card__head {
  text-align: center;
  margin-bottom: clamp(0.9rem, 2.2vh, 1.5rem);
}
.ts-auth-card__head h2 {
  font-family: "Be Vietnam Pro", "Inter", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.4vh, 30px);
  color: var(--ts-navy);
  margin: 0 0 0.3rem;
}
.ts-auth-card__head p {
  margin: 0;
  font-size: 15px;
  color: var(--ts-muted);
}

.ts-auth-card .form-item,
.ts-auth-card .js-form-item {
  margin-bottom: clamp(0.7rem, 1.9vh, 1.15rem);
}
.ts-auth-card label {
  display: block;
  padding: 0;
  margin-bottom: 0.42rem;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ts-navy);
}
.ts-auth-card .form-required::after {
  content: " *";
  color: var(--ts-red);
}
.ts-auth-card .form-control,
.ts-auth-card input[type=text],
.ts-auth-card input[type=email],
.ts-auth-card input[type=password] {
  width: 100%;
  min-width: 0;
  font-family: inherit;
  border: 1px solid #DDE3EC;
  border-radius: 12px;
  padding: 0.78rem 1rem;
  margin-top: 0;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ts-navy);
  background-color: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.ts-auth-card .form-control::placeholder {
  color: #9CA7B5;
}
.ts-auth-card .form-control:focus {
  outline: none;
  border-color: var(--ts-blue-400);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.18);
}
.ts-auth-card form p {
  margin: -0.15rem 0 0.25rem;
}
.ts-auth-card div.description,
.ts-auth-card div.form-text,
.ts-auth-card form p {
  margin-top: 0.3rem;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ts-muted);
}
.ts-auth-card .ts-field .form-control {
  padding-left: 2.95rem;
  background-repeat: no-repeat;
  background-position: 1rem center;
  background-size: 19px 19px;
}
.ts-auth-card .ts-field--user .form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA7B5' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='4.5' width='19' height='15' rx='2.5'/%3E%3Cpath d='m3.2 7 8.8 6 8.8-6'/%3E%3C/svg%3E");
}
.ts-auth-card .ts-field--pass .form-control {
  padding-right: 3rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA7B5' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}
.ts-auth-card .form-actions {
  margin: clamp(0.85rem, 2.2vh, 1.35rem) 0 0;
}
.ts-auth-card .btn-ts-blue,
.ts-auth-card .form-actions input[type=submit],
.ts-auth-card .form-actions button[type=submit] {
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #155E9C 0%, #2B7FD4 100%);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 0.82rem 1rem;
  box-shadow: 0 8px 20px rgba(21, 94, 156, 0.25);
  transition: filter 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.ts-auth-card .form-actions input[type=submit]:hover,
.ts-auth-card .form-actions button[type=submit]:hover {
  filter: brightness(1.06);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(21, 94, 156, 0.32);
}
.ts-auth-card .messages,
.ts-auth-card .alert {
  border-radius: 10px;
  font-size: 14px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.9rem;
}

.ts-field {
  position: relative;
}

.ts-pass-toggle {
  position: absolute;
  right: 0.7rem;
  bottom: 0;
  height: 3.05rem;
  width: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: none;
  color: #9CA7B5;
  cursor: pointer;
}
.ts-pass-toggle svg {
  width: 19px;
  height: 19px;
}
.ts-pass-toggle:hover {
  color: var(--ts-blue);
}

.ts-auth-forgot {
  margin: -0.35rem 0 0;
  text-align: right;
}
.ts-auth-forgot a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ts-blue);
  text-decoration: none;
}
.ts-auth-forgot a:hover {
  color: var(--ts-red);
  text-decoration: underline;
}

.ts-auth-links {
  margin-top: clamp(0.6rem, 1.6vh, 1rem);
  text-align: center;
}

.ts-auth-links__muted {
  font-size: 14px;
  color: var(--ts-muted);
  text-decoration: none;
}
.ts-auth-links__muted:hover {
  color: var(--ts-blue);
}

.ts-auth-links__cta {
  margin: 0.45rem 0 0;
  font-size: 14px;
  color: var(--ts-muted);
}
.ts-auth-links__cta a {
  color: var(--ts-blue);
  font-weight: 600;
  text-decoration: none;
}
.ts-auth-links__cta a:hover {
  color: var(--ts-red);
}

.ts-auth-note {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: clamp(0.7rem, 1.8vh, 1.1rem);
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--ts-soft-blue);
}
.ts-auth-note > svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--ts-blue);
}
.ts-auth-note strong {
  display: block;
  font-size: 14px;
  color: var(--ts-navy);
}
.ts-auth-note span {
  font-size: 13.5px;
  color: var(--ts-muted);
  line-height: 1.5;
}

.ts-auth-foot {
  flex: 0 0 auto;
  text-align: center;
  padding-top: 0.7rem;
  font-size: 12.5px;
  color: var(--ts-muted);
}

@media (min-width: 992px) and (max-height: 820px) {
  .ts-auth-hero__body {
    margin-top: 1rem;
  }
  .ts-auth-hero__lead {
    margin-bottom: 0.8rem;
  }
  .ts-auth-feature {
    margin-bottom: 0.5rem;
  }
  .ts-auth-feature .ic {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .ts-auth-feature .ic svg {
    width: 18px;
    height: 18px;
  }
  .ts-auth-feature small {
    font-size: 12.5px;
  }
  .ts-auth-note {
    padding: 0.6rem 0.75rem;
  }
}
@media (min-width: 992px) and (max-height: 720px) {
  .ts-auth-feature {
    align-items: center;
    margin-bottom: 0.4rem;
  }
  .ts-auth-note {
    display: none;
  }
  .ts-auth-card {
    max-width: 420px;
  }
}
@media (min-width: 992px) and (max-height: 540px) {
  .ts-auth-hero__lead,
  .ts-auth-features {
    display: none;
  }
  .ts-auth-card__head p {
    display: none;
  }
}
@media (max-width: 991.98px) {
  body.ts-auth-page {
    overflow: auto;
  }
  body.ts-auth-page .ts-auth {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .ts-auth-hero {
    min-height: clamp(175px, 25vh, 250px);
    background-position: center, center 68%;
    background-image: linear-gradient(180deg, rgba(6, 24, 46, 0.92) 0%, rgba(9, 30, 58, 0.78) 45%, rgba(6, 24, 46, 0.55) 100%), url("../image/login-hero.webp");
  }
  .ts-auth-hero__inner {
    padding: 1.2rem 1.25rem 1.5rem;
  }
  .ts-auth-hero__body {
    margin-top: 0.9rem;
  }
  .ts-auth-hero__title {
    font-size: clamp(20px, 5vw, 26px);
  }
  .ts-auth-hero__title-flow {
    white-space: normal;
    font-size: clamp(17px, 4.4vw, 23px);
  }
  .ts-auth-hero__lead,
  .ts-auth-features {
    display: none;
  }
  .ts-auth-main {
    overflow: visible;
    padding: 0.85rem 0.9rem 1.25rem;
  }
  .ts-auth-card {
    margin: 0.7rem auto 0;
    max-width: 480px;
    border-radius: 18px;
    padding: 1.25rem 1.15rem;
  }
}
@media (max-width: 575.98px) {
  .ts-auth-hero {
    min-height: 190px;
  }
  .ts-auth-card {
    padding: 1.2rem 1.05rem;
    border-radius: 16px;
  }
  .ts-auth-card .form-control {
    font-size: 16px;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }
  .ts-auth-card__head h2 {
    font-size: 21px;
  }
  .ts-pass-toggle {
    height: 2.85rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ts-auth-card .form-actions input[type=submit]:hover,
  .ts-auth-card .form-actions button[type=submit]:hover {
    transform: none;
  }
}
