/* ============================================================================
   Auth Page Styles
   ============================================================================ */

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

html {
  height: -webkit-fill-available;
}

.auth-screen,
.auth-screen * {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background:
    radial-gradient(900px 600px at 20% 20%, rgba(255, 255, 255, 0.28), transparent 55%),
    radial-gradient(900px 700px at 90% 20%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #0b78ff 0%, #0b4dd6 40%, #0732aa 100%);
}

.auth-card {
  width: 100%;
  max-width: none;
  flex: 1;
  min-height: 100vh;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  backdrop-filter: none;
}

.auth-hero {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 126, 255, 0.95) 0%, rgba(7, 45, 140, 0.98) 100%);
  color: #fff;
}

.auth-hero::before,
.auth-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  width: 520px;
  height: 520px;
  left: -240px;
  bottom: -280px;
}

.auth-hero::after {
  width: 700px;
  height: 700px;
  left: -340px;
  bottom: -400px;
  border-color: rgba(255, 255, 255, 0.14);
}

.auth-hero-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-size: cover;
  background-position: center;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.auth-hero-inner {
  position: relative;
  height: 100%;
  padding: 72px 86px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.auth-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  opacity: 0.98;
}

.auth-brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

.auth-brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.auth-hero-copy {
  margin-top: 12px;
  max-width: 420px;
}

.auth-hero-title {
  font-size: 46px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.6px;
}

.auth-hero-subtitle {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.auth-hero-cta {
  align-self: flex-start;
  margin-top: 10px;
  border: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  cursor: pointer;
  position: relative;
  z-index: 10;
  display: inline-block;
  font-size: 14px;
  line-height: 1.4;
  transition: background 0.2s ease;
}

.auth-hero-cta:hover {
  background: rgba(255, 255, 255, 0.22);
}

.auth-panel {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 76px;
}

.auth-panel-inner {
  width: min(360px, 100%);
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #1f2937;
  margin: 0;
}

.auth-subtitle {
  margin-top: 6px;
  font-size: 14px;
  color: #6b7280;
}

.auth-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  font-size: 13px;
  line-height: 1.35;
}

.auth-form {
  margin-top: 22px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field-tight {
  margin-bottom: 8px;
}

/* Mobile-optimized input wrapper */
.auth-input-wrapper {
  position: relative;
  width: 100%;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

/* The actual input field */
.auth-input-field {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border-radius: 999px;
  border: 1px solid #eef0f4;
  background: #fbfbfc;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  font-size: 16px;
  color: #111827;
  outline: none;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.auth-input-field:focus {
  border-color: rgba(11, 120, 255, 0.45);
  box-shadow: 0 0 0 4px rgba(11, 120, 255, 0.12);
  background: #fff;
}

.auth-input-field::placeholder {
  color: rgba(17, 24, 39, 0.35);
}

/* Icon positioned absolutely */
.auth-input-icon-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(17, 24, 39, 0.35);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Password field with toggle button */
.auth-input-with-toggle {
  padding-right: 50px;
}

/* Password toggle button */
.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: color 0.2s ease;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 44px;
  min-height: 44px;
}

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

.eye-icon {
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.auth-row {
  margin: 10px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  padding: 8px 8px 8px 0;
  margin: -8px -8px -8px 0;
  min-height: 40px;
  position: relative;
}

.auth-checkbox input[type="checkbox"] {
  margin: 0;
  position: relative;
  z-index: 1;
}

.auth-checkbox-label {
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}

.auth-primary {
  width: 100%;
  border: 0;
  cursor: pointer;
  padding: 0 14px;
  min-height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0b78ff 0%, #0b5de3 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 12px 30px rgba(11, 120, 255, 0.28);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-primary:hover {
  filter: brightness(0.98);
}

.auth-link {
  width: 100%;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.auth-link:hover {
  text-decoration: underline;
  color: #374151;
}

.auth-link[disabled] {
  opacity: 0.85;
}

.auth-switch {
  margin-top: 16px;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

.auth-link-inline {
  border: 0;
  background: transparent;
  color: #0b78ff;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
}

.auth-link-inline:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 26px;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}

.auth-demo-users {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.auth-demo-users p {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 10px;
  font-weight: 600;
}

.auth-demo-user-btn {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 8px;
  border: 1px solid #eef0f4;
  border-radius: 999px;
  background: #fbfbfc;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.auth-demo-user-btn:hover {
  background: #fff;
  border-color: rgba(11, 120, 255, 0.3);
  transform: translateX(4px);
}

@media (max-width: 920px) {
  .auth-screen {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
  
  .auth-card {
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
  
  .auth-hero {
    min-height: 240px;
    flex-shrink: 0;
  }
  
  .auth-hero-inner {
    padding: 32px 24px;
  }
  
  .auth-panel {
    padding: 36px 24px;
    flex: 1;
    display: flex;
    align-items: center;
  }
  
  /* Larger touch targets on mobile */
  .auth-input-field {
    min-height: 52px;
    padding: 16px 18px 16px 52px;
  }
  
  .auth-input-icon-left {
    left: 18px;
  }
  
  .auth-primary {
    min-height: 52px;
    padding: 0 16px;
    font-size: 16px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
