/* ==========================================================================
   TTS Professional Login Page - Responsive & Pixel Perfect
   ========================================================================== */

:root {
  --tts-primary-green: #0e4a36;
  --tts-primary-green-hover: #0a3828;
  --tts-primary-green-glow: rgba(14, 74, 54, 0.22);
  --tts-bg-light: #f5f7fa;
  --tts-card-bg: #ffffff;
  --tts-text-dark: #0f172a;
  --tts-text-muted: #64748b;
  --tts-text-light: #94a3b8;
  --tts-border: #e2e8f0;
  --tts-input-bg: #f8fafc;
  --tts-link-blue: #2563eb;
  --tts-link-blue-hover: #1d4ed8;
}

/* Universal box-sizing to eliminate width calculations overflow */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Reset and ensure zero horizontal overflow */
html,
body {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  background-color: var(--tts-bg-light);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--tts-text-dark);
  -webkit-font-smoothing: antialiased;
}

/* Hide standard website components */
body>.navbar,
body>.web-footer,
.page-breadcrumbs,
.page-header-wrapper,
.page-footer {
  display: none !important;
}

.page-content-wrapper,
.page_content,
main.container {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Split-screen container */
.tts-login-container {
  display: flex;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  background-color: var(--tts-bg-light);
  box-sizing: border-box;
}

/* ==========================================================================
   LEFT HERO SECTION
   ========================================================================== */

.tts-hero-side {
  flex: 1 1 60%;
  width: 60%;
  min-width: 0;
  position: relative;
  background-image: url("/assets/v16ui/images/login_bg.jpg?v=2");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  overflow: hidden;
}

/* Ambient gradient overlays:
   1. Light top-left fade so black text and logo are crystal clear
   2. Dark bottom fade so white road badges are crisp and legible */
.tts-hero-side::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 30%, rgba(255, 255, 255, 0) 65%),
    linear-gradient(to top, rgba(12, 19, 28, 0.92) 0%, rgba(12, 19, 28, 0.7) 75px, rgba(12, 19, 28, 0) 160px);
  z-index: 1;
  pointer-events: none;
}

.tts-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 64px 40px 64px;
  box-sizing: border-box;
  max-width: 100%;
}

.tts-hero-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
}

.tts-hero-logo {
  height: 52px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  margin-bottom: 36px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tts-hero-typography {
  max-width: 520px;
}

.tts-hero-title {
  font-size: 50px;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: #0f172a;
  margin: 0 0 16px 0;
}

.tts-hero-subtitle {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  color: #475569;
  margin: 0;
}

/* Bottom Pillars across highway */
.tts-hero-pillars {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 20px;
  max-width: 100%;
  box-sizing: border-box;
}

.tts-pillar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.tts-pillar-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0.95;
}

.tts-pillar-content {
  display: flex;
  flex-direction: column;
}

.tts-pillar-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.tts-pillar-desc {
  font-size: 12px;
  font-weight: 400;
  color: #cbd5e1;
  line-height: 1.25;
  margin-top: 2px;
}

.tts-pillar-divider {
  width: 1px;
  height: 28px;
  background-color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

/* ==========================================================================
   RIGHT AUTH SECTION
   ========================================================================== */

.tts-auth-side {
  flex: 1 1 40%;
  width: 40%;
  min-width: 0;
  background-color: var(--tts-bg-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 32px 44px;
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Top bar: Language Picker */
.tts-auth-topbar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.tts-language-picker {
  position: relative;
}

.tts-lang-btn {
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tts-lang-btn:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}

.tts-lang-globe {
  color: #64748b;
}

.tts-lang-chevron {
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.tts-language-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: #ffffff;
  border: 1px solid var(--tts-border);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  min-width: 160px;
  z-index: 100;
  padding: 6px;
}

.tts-language-dropdown-menu.show {
  display: block;
}

.tts-lang-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  font-size: 14px;
  color: #334155;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.tts-lang-option:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.tts-lang-option.active {
  background-color: #e2e8f0;
  font-weight: 600;
}

/* ==========================================================================
   AUTH CARD
   ========================================================================== */

.tts-card-wrapper {
  width: 100%;
  max-width: 440px;
  margin: auto 0;
  box-sizing: border-box;
  padding: 0 4px;
}

.tts-auth-card {
  width: 100%;
  max-width: 100%;
  background: var(--tts-card-bg);
  border-radius: 20px;
  box-shadow: 0 16px 36px -10px rgba(15, 23, 42, 0.06), 0 0 1px 1px rgba(15, 23, 42, 0.04);
  padding: 42px 38px;
  box-sizing: border-box;
}

.tts-card-header {
  margin-bottom: 26px;
}

.tts-card-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--tts-text-dark);
  margin: 0 0 6px 0;
  letter-spacing: -0.015em;
}

.tts-card-subtitle {
  font-size: 14px;
  color: var(--tts-text-muted);
  margin: 0;
  font-weight: 400;
}

/* Input Fields */
.tts-form-group {
  margin-bottom: 18px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.tts-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.tts-field-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}

.tts-input {
  width: 100% !important;
  max-width: 100% !important;
  height: 48px;
  padding: 0 14px 0 42px;
  font-size: 14px;
  color: var(--tts-text-dark);
  background-color: var(--tts-input-bg);
  border: 1px solid var(--tts-border);
  border-radius: 10px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box !important;
}

.tts-input::placeholder {
  color: var(--tts-text-light);
}

.tts-input:focus {
  background-color: #ffffff;
  border-color: var(--tts-primary-green);
  box-shadow: 0 0 0 3px var(--tts-primary-green-glow);
}

.tts-password-input {
  padding-right: 44px;
}

.tts-toggle-password-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s ease;
  z-index: 2;
}

.tts-toggle-password-btn:hover {
  color: #475569;
}

/* Error states */
.tts-form-group.invalid .tts-input {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

.tts-field-error {
  margin: 6px 0 0 4px;
  font-size: 12px;
  color: #ef4444;
  line-height: 1.3;
}

.tts-login-error-banner {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Forgot Password message */
.tts-forgot-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
  margin-bottom: 22px;
}

.tts-forgot-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--tts-link-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

.tts-forgot-link:hover {
  color: var(--tts-link-blue-hover);
  text-decoration: underline;
}

/* Submit Login Button */
.tts-btn-submit {
  width: 100%;
  height: 48px;
  background-color: var(--tts-primary-green);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px var(--tts-primary-green-glow);
  box-sizing: border-box;
}

.tts-btn-submit:hover {
  background-color: var(--tts-primary-green-hover);
  box-shadow: 0 6px 16px rgba(14, 74, 54, 0.3);
  transform: translateY(-1px);
}

.tts-btn-submit:active {
  transform: translateY(0);
}

.tts-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Divider */
.tts-divider {
  display: flex;
  align-items: center;
  margin: 22px 0;
  color: var(--tts-text-light);
  font-size: 13px;
  width: 100%;
}

.tts-divider-line {
  flex: 1;
  height: 1px;
  background-color: var(--tts-border);
}

.tts-divider-text {
  padding: 0 16px;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 400;
}

/* Social & Office 365 Button */
.tts-social-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.tts-btn-social {
  width: 100%;
  height: 46px;
  background-color: #f8fafc;
  border: 1px solid var(--tts-border);
  border-radius: 10px;
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.tts-btn-social:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  text-decoration: none;
}

.tts-btn-social img,
.tts-btn-social svg {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Additional state sections */
.tts-auth-card section {
  width: 100%;
}

/* ==========================================================================
   TWO-FACTOR AUTHENTICATION (OTP) SECTION
   ========================================================================== */

.for-verify {
  width: 100%;
}

.tts-otp-message-box {
  margin-bottom: 20px;
  width: 100%;
}

.tts-otp-message-box:empty {
  display: none;
}

.tts-otp-message-box .text-muted {
  padding-bottom: 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #f1f5f9;
  border: 1px solid var(--tts-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: #334155 !important;
  font-size: 13.5px;
  line-height: 1.45;
  margin: 0;
  box-sizing: border-box;
}

.tts-otp-message-box .text-muted::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e4a36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'%3E%3C/path%3E%3Cpath d='m9 12 2 2 4-4'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.tts-otp-message-box #qr_info {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

#login_token {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

#login_token::placeholder {
  font-weight: 400;
  letter-spacing: normal;
}

.tts-qrcode-box {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--tts-border);
  border-radius: 12px;
  margin: 16px 0;
}

.tts-qrcode-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

/* Invalid / Shake Feedback Animation */
@keyframes tts-shake {
  0%, 100% {
    transform: translateX(0);
  }
  20%, 60% {
    transform: translateX(-8px);
  }
  40%, 80% {
    transform: translateX(8px);
  }
}

.tts-auth-card.invalid-login {
  animation: tts-shake 0.45s ease-in-out;
}

.sign-up-message {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--tts-text-muted);
}

.sign-up-message a {
  color: var(--tts-link-blue);
  font-weight: 500;
  text-decoration: none;
}

.sign-up-message a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.tts-auth-footer {
  width: 100%;
  text-align: center;
  margin-top: 24px;
  box-sizing: border-box;
}

.tts-footer-copyright {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 4px 0;
}

.tts-footer-powered {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.tts-footer-powered strong {
  color: #475569;
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE DESIGN & NO HORIZONTAL SCROLL
   ========================================================================== */

@media (max-width: 1200px) {
  .tts-hero-content {
    padding: 44px 48px 36px 48px;
  }

  .tts-hero-title {
    font-size: 42px;
  }

  .tts-hero-pillars {
    gap: 20px;
  }

  .tts-auth-side {
    padding: 28px 32px;
  }
}

@media (max-width: 991px) {
  .tts-login-container {
    flex-direction: column !important;
    min-height: auto;
    width: 100% !important;
  }

  .tts-hero-side {
    width: 100% !important;
    flex: none !important;
    min-height: 420px;
  }

  .tts-hero-content {
    padding: 36px 32px 30px 32px;
  }

  .tts-auth-side {
    width: 100% !important;
    flex: none !important;
    min-height: auto;
    padding: 40px 20px 32px 20px;
  }

  .tts-card-wrapper {
    max-width: 440px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .tts-hero-side {
    min-height: 340px;
  }

  .tts-hero-content {
    padding: 28px 20px 22px 20px;
  }

  .tts-hero-logo {
    height: 38px;
    margin-bottom: 24px;
  }

  .tts-hero-title {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .tts-hero-subtitle {
    font-size: 15px;
  }

  .tts-hero-pillars {
    gap: 12px;
  }

  .tts-pillar-divider {
    display: none;
  }

  .tts-pillar-item {
    gap: 10px;
  }

  .tts-auth-side {
    padding: 24px 14px 24px 14px;
  }

  .tts-auth-card {
    padding: 30px 20px;
    border-radius: 16px;
  }

  .tts-card-title {
    font-size: 23px;
  }
}

@media (max-width: 380px) {
  .tts-hero-title {
    font-size: 28px;
  }

  .tts-auth-card {
    padding: 24px 16px;
  }
}