/* ============================================================
   TEZ ERP — auth.css
   Styles for Sign In, Sign Up, and Auth portal pages
   ============================================================ */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}

.auth-topo-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.auth-topo-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Header */
.auth-header {
  padding: 24px clamp(24px, 4vw, 48px);
  position: relative;
  z-index: 1;
}

.auth-header .logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* Main Auth Layout */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px clamp(20px, 4vw, 48px) 48px;
  position: relative;
  z-index: 1;
}

.auth-container {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

/* Left Visual Column */
.auth-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.auth-visual-inner {
  position: relative;
  width: 100%;
  max-width: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-visual img {
  width: 100%;
  max-width: 560px;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
}

/* Right Content Column */
.auth-content {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
}

.auth-heading-group {
  margin-bottom: 28px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--graphite);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: var(--fs-body);
  color: var(--slate);
  line-height: 1.45;
}

/* Login Option Cards */
.auth-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.auth-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  cursor: pointer;
}

.auth-option-card:hover {
  border-color: var(--azure);
  box-shadow: 0 10px 24px -6px rgba(47, 111, 237, 0.16);
  transform: translateY(-2px);
}

.auth-option-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-option-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease);
}

.auth-option-card:hover .auth-option-icon {
  transform: scale(1.05);
}

.icon-user {
  background: #EBF3FF;
  color: #2F6FED;
}

.icon-employee {
  background: #F3E8FF;
  color: #8E44AD;
}

.icon-partner {
  background: #E6F7F0;
  color: #10B981;
}

.auth-option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-option-title {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--graphite);
  line-height: 1.3;
}

.auth-option-desc {
  font-size: var(--fs-caption);
  color: var(--slate-soft);
  line-height: 1.35;
}

.auth-option-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}

.auth-option-card:hover .auth-option-arrow {
  background: var(--azure);
  color: #fff;
  transform: translateX(3px);
}

/* Footer / Helper Links */
.auth-footer-links {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-switch {
  font-size: var(--fs-body-sm);
  color: var(--slate);
}

.auth-switch a {
  color: var(--azure);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-switch a:hover {
  color: var(--azure-dark);
}

.auth-help a {
  font-size: var(--fs-body-sm);
  color: var(--slate);
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}

.auth-help a:hover {
  color: var(--graphite);
  text-decoration: underline;
}

.auth-legal {
  font-size: var(--fs-caption);
  color: var(--slate-soft);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-legal a {
  color: var(--slate-soft);
  transition: color var(--dur-fast) var(--ease);
}

.auth-legal a:hover {
  color: var(--slate);
  text-decoration: underline;
}

/* ============================================================
   SVG Polygon Geometric Background
   ============================================================ */
.background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.background svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================================
   Portal Sign In Card (User, Employee, Partner)
   ============================================================ */
.portal-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  position: relative;
}

.login-card-container {
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.login-card {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

/* Card Left: Login Form */
.login-card-left {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.login-header-group {
  margin-bottom: 16px;
}

.login-brand-logo {
  display: inline-block;
  margin-bottom: 12px;
}

.login-brand-logo img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.login-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.login-heading {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--graphite);
  letter-spacing: -0.02em;
}

.login-subheading {
  font-size: var(--fs-caption);
  color: var(--slate);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--graphite);
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  font-size: var(--fs-body-sm);
  color: var(--graphite);
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.form-input:focus {
  outline: none;
  border-color: var(--azure);
  box-shadow: 0 0 0 3.5px rgba(47, 111, 237, 0.14);
}

.form-input::placeholder {
  color: var(--slate-soft);
}

.btn--login {
  width: 100%;
  padding: 10px 16px;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  border-radius: 6px;
  margin-top: 4px;
}

.login-card-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-caption);
}

.link-forgot {
  color: var(--azure);
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}

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

.link-signup {
  color: var(--slate);
}

.link-signup strong {
  color: var(--azure);
  font-weight: 600;
}

.link-signup:hover strong {
  color: var(--azure-dark);
  text-decoration: underline;
}

/* Card Right: Information & Guidelines Panel (SS2) */
.login-card-right {
  background: linear-gradient(155deg, #1B58C9 0%, #2A6BF2 60%, #4D87FA 100%);
  color: #ffffff;
  padding: 32px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-card-right::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.info-header {
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.info-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.35;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  z-index: 1;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.79rem;
  line-height: 1.42;
  color: rgba(255, 255, 255, 0.92);
}

.info-list li strong {
  color: #ffffff;
}

.info-list li code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.18);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.bullet-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #BBD5FF;
  margin-top: 5px;
  flex-shrink: 0;
}

/* ============================================================
   Partner Login Card
   ============================================================ */
.partner-card-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.partner-card {
  width: 100%;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 60px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.05);
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.partner-brand-logo {
  display: inline-block;
  margin-bottom: 20px;
}

.partner-brand-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.partner-heading {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #2F6FED;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
  text-align: center;
}

.partner-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.partner-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 12px;
}

.link-generate {
  font-size: var(--fs-caption);
  color: var(--slate);
  transition: color var(--dur-fast) var(--ease);
}

.link-generate:hover {
  color: var(--azure);
  text-decoration: underline;
}

.btn--partner {
  padding: 9px 24px;
  font-size: var(--fs-body-sm);
  font-weight: 600;
  border-radius: 6px;
}

/* Copyright footer */
.login-copyright {
  text-align: center;
  font-size: var(--fs-caption);
  color: var(--slate-soft);
}

/* Responsive for Portal Chooser (login.html) & Portal Sign-in Cards */
@media (max-width: 860px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  .auth-wrapper {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  /* Center logo in header on mobile */
  .auth-header {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 16px 4px;
    flex-shrink: 0;
  }

  .auth-header .logo-img {
    height: 40px;
  }

  /* Mobile main area */
  .auth-main {
    padding: 4px 16px 12px;
    align-items: center;
    justify-content: center;
    flex: 1;
    overflow: hidden;
  }

  /* Switch grid to single column centered layout */
  .auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    gap: 0;
  }

  /* Hide the left illustration (signin.png) on mobile only */
  .auth-visual {
    display: none !important;
  }

  /* Center the auth content container */
  .auth-content {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Center headings on mobile */
  .auth-heading-group {
    text-align: center;
    margin-bottom: 12px;
    width: 100%;
  }

  .auth-title {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 2px;
  }

  .auth-subtitle {
    text-align: center;
    font-size: 0.85rem;
  }

  /* Center option cards within the container */
  .auth-options {
    width: 100%;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
  }

  .auth-option-card {
    width: 100%;
    max-width: 330px;
    padding: 10px 14px;
  }

  .auth-option-left {
    gap: 12px;
  }

  .auth-option-icon {
    width: 36px;
    height: 36px;
  }

  .auth-option-icon svg {
    width: 18px;
    height: 18px;
  }

  .auth-option-title {
    font-size: 0.9rem;
  }

  .auth-option-desc {
    font-size: 0.78rem;
  }

  .auth-option-arrow {
    width: 28px;
    height: 28px;
  }

  /* Center footer & legal links on mobile */
  .auth-footer-links {
    text-align: center;
    align-items: center;
    width: 100%;
    gap: 6px;
  }

  .auth-switch {
    font-size: 0.82rem;
  }

  .auth-legal {
    justify-content: center;
    margin-top: 2px;
    font-size: 0.75rem;
  }

  /* Responsive for Portal Login Cards (User, Employee, Partner) */
  .login-card {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .login-card-left {
    padding: 32px 24px;
  }

  .login-card-right {
    padding: 32px 24px;
  }
}

