/* ============================================================
   ADOBE CONNECT — Login Page Styles
   ============================================================ */

/* ── Page Wrapper ────────────────────────────────────────── */
.login-page {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════
   BRAND PANEL (left)
══════════════════════════════════════════════════════════ */
.brand-panel {
  flex: 0 0 var(--brand-panel-width);
  position: relative;
  background: var(--color-bg-brand);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-10);
  animation: slideInLeft var(--duration-slower) var(--ease-out-cubic) both;
}

/* Animated background orbs */
.brand-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.brand-bg__orb {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(80px);
  animation: orbFloat 12s ease-in-out infinite;
}

.brand-bg__orb--1 {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, rgba(235,28,36,0.18), transparent 70%);
  animation-duration: 14s;
}

.brand-bg__orb--2 {
  width: 360px;
  height: 360px;
  bottom: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(99,102,241,0.16), transparent 70%);
  animation-duration: 18s;
  animation-delay: -4s;
}

.brand-bg__orb--3 {
  width: 260px;
  height: 260px;
  top: 40%;
  left: 50%;
  background: radial-gradient(circle, rgba(30,64,175,0.14), transparent 70%);
  animation-duration: 22s;
  animation-delay: -8s;
}

/* Grid overlay */
.brand-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Brand panel content */
.brand-content {
  position: relative;
  z-index: var(--z-above);
  max-width: 360px;
}

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-12);
}

.brand-logo__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

/* Hero headline */
.brand-headline {
  margin-bottom: var(--space-6);
}

.brand-headline h1 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
}

.brand-headline p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-loose);
  font-weight: var(--weight-light);
}

/* Feature list */
.brand-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-10);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.feature-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-lg);
  background: var(--brand-primary-tint);
  border: 1px solid var(--brand-primary-tint2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary-light);
}

.feature-icon svg {
  width: 18px;
  height: 18px;
}

.feature-text h3 {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
  letter-spacing: var(--tracking-base);
}

.feature-text p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: var(--leading-snug);
}

/* Stats row */
.brand-stats {
  display: flex;
  gap: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.brand-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.brand-stat__value {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}

.brand-stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-weight: var(--weight-medium);
}

/* ══════════════════════════════════════════════════════════
   FORM PANEL (right)
══════════════════════════════════════════════════════════ */
.form-panel {
  flex: 1;
  background: var(--color-bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-8);
  overflow-y: auto;
  position: relative;
  animation: slideInRight var(--duration-slower) var(--ease-out-cubic) both;
}

/* Subtle top border accent */
.form-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
}

.form-panel__inner {
  width: 100%;
  max-width: var(--form-max-width);
  animation: slideUp 0.5s var(--ease-out-cubic) 0.15s both;
}

/* ── Company logo mark (above form header, right panel) ─── */
.form-company-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-8);
}

/* Shared company logo component */
.company-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  flex-shrink: 0;
}

.company-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Initials fallback */
.company-logo__initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-snug);
  color: #fff;
  background: var(--brand-primary);
  font-family: var(--font-sans);
}

/* Sizes */
.company-logo--brand {
  width: 40px;
  height: 40px;
}
.company-logo--brand .company-logo__initials {
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
}

.company-logo--form {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-border);
}
.company-logo--form img {
  border-radius: var(--radius-2xl);
}
.company-logo--form .company-logo__initials {
  font-size: var(--text-xl);
  border-radius: var(--radius-2xl);
}

/* Brand panel company name + platform name */
.brand-logo__company {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  color: var(--color-text-primary);
  line-height: 1;
}

.brand-logo__platform {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-top: 3px;
}

/* Powered-by badge */
.powered-by {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: rgba(255,255,255,0.03);
  margin-top: var(--space-6);
}

.powered-by__text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
}

.powered-by__mark {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--brand-primary);
  letter-spacing: var(--tracking-snug);
}

/* Form header */
.form-header {
  margin-bottom: var(--space-8);
}

.form-header__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: var(--space-4);
}

.form-header__label-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  animation: pulse 2s infinite;
}

.form-header h2 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.form-header p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* ── Alert Banner ────────────────────────────────────────── */
.alert {
  display: none;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  animation: slideUp var(--duration-base) var(--ease-out-cubic) both;
}

.alert.is-visible {
  display: flex;
}

.alert--error {
  background: var(--color-error-bg);
  border: 1px solid rgba(239,68,68,0.25);
  color: #fca5a5;
}

.alert--success {
  background: var(--color-success-bg);
  border: 1px solid rgba(34,197,94,0.25);
  color: #86efac;
}

.alert__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.alert__message {
  line-height: var(--leading-snug);
}

/* ── Form Groups ─────────────────────────────────────────── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  letter-spacing: var(--tracking-snug);
  user-select: none;
}

/* Input wrapper */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color var(--duration-base) var(--ease-out-cubic);
  z-index: var(--z-above);
}

.input-icon svg {
  width: 17px;
  height: 17px;
}

.form-input {
  width: 100%;
  height: var(--input-height);
  padding: 0 var(--space-12) 0 var(--space-10);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  transition:
    border-color var(--duration-base) var(--ease-out-cubic),
    background-color var(--duration-base) var(--ease-out-cubic),
    box-shadow var(--duration-base) var(--ease-out-cubic);
  letter-spacing: var(--tracking-snug);
}

.form-input::placeholder {
  color: var(--color-text-muted);
  font-weight: var(--weight-regular);
}

.form-input:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-input-focus);
}

.form-input:focus {
  border-color: var(--brand-primary);
  background: var(--color-bg-input-focus);
  box-shadow: 0 0 0 3px var(--brand-primary-glow);
  outline: none;
}

/* Focus moves icon color */
.form-group:focus-within .input-icon {
  color: var(--brand-primary-light);
}

/* Input status icon (tick / x) */
.input-status {
  position: absolute;
  right: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-base);
  pointer-events: none;
}

.input-status svg {
  width: 16px;
  height: 16px;
}

.form-group.is-valid   .input-status { opacity: 1; color: var(--color-success); }
.form-group.is-invalid .input-status { opacity: 1; color: var(--color-error); }
.form-group.is-valid   .form-input   { border-color: rgba(34,197,94,0.4); }
.form-group.is-invalid .form-input   { border-color: rgba(239,68,68,0.4); box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }

/* Password input — extra right padding for toggle */
#password { padding-right: calc(var(--space-12) + var(--space-8)); }

/* Hide the browser's native password-reveal eye (Edge / IE / Chrome) */
#password::-ms-reveal,
#password::-ms-clear,
#password::-webkit-credentials-auto-fill-button { display: none !important; }

/* Password toggle button */
.btn-pwd-toggle {
  position: absolute;
  right: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast);
  z-index: var(--z-above);
  background: none;
  border: none;
}

.btn-pwd-toggle:hover { color: var(--color-text-secondary); }
.btn-pwd-toggle svg   { width: 17px; height: 17px; }
.btn-pwd-toggle .icon-eye-off { display: none; }
.btn-pwd-toggle.is-active .icon-eye     { display: none; }
.btn-pwd-toggle.is-active .icon-eye-off { display: block; }

/* Field error message */
.field-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 16px;
  display: block;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity var(--duration-base) var(--ease-out-cubic),
    transform var(--duration-base) var(--ease-out-cubic);
}

.form-group.is-invalid .field-error {
  opacity: 1;
  transform: translateY(0);
}

/* ── Inline Row: Remember me + Forgot ────────────────────── */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Custom checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-box {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--color-border-hover);
  border-radius: var(--radius-xs);
  background: var(--color-bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--duration-base),
    border-color var(--duration-base),
    box-shadow var(--duration-base);
}

.checkbox-box svg {
  width: 10px;
  height: 10px;
  color: #fff;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity var(--duration-fast),
    transform var(--duration-base) var(--ease-spring);
}

.checkbox-label input:checked ~ .checkbox-box {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px var(--brand-primary-glow);
}

.checkbox-label input:checked ~ .checkbox-box svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-label input:focus-visible ~ .checkbox-box {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.checkbox-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Forgot password link */
.link-forgot {
  font-size: var(--text-sm);
  color: var(--brand-primary-light);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-snug);
  transition: color var(--duration-fast);
  position: relative;
}

.link-forgot::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--brand-primary);
  transition: width var(--duration-base) var(--ease-out-cubic);
}

.link-forgot:hover {
  color: var(--brand-primary);
}

.link-forgot:hover::after {
  width: 100%;
}

/* ── Submit Button ─────────────────────────────────────── */
.btn-signin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: var(--btn-height);
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-snug);
  overflow: hidden;
  transition:
    background var(--duration-base),
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-base);
  margin-top: var(--space-2);
}

.btn-signin::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.btn-signin:hover {
  background: var(--brand-primary-dark);
  box-shadow: 0 6px 20px var(--brand-primary-glow);
  transform: translateY(-1px);
}

.btn-signin:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-signin:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-signin__text {
  transition: opacity var(--duration-fast);
}

.btn-signin__loader {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-signin.is-loading .btn-signin__text {
  opacity: 0;
}

.btn-signin.is-loading .btn-signin__loader {
  display: block;
}

/* ── Divider ─────────────────────────────────────────────── */
.form-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-2) 0;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.form-divider span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  font-weight: var(--weight-medium);
}

/* ── Guest Button ────────────────────────────────────────── */
.btn-guest {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  height: var(--btn-height);
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-snug);
  transition:
    background var(--duration-base),
    border-color var(--duration-base),
    color var(--duration-base),
    transform var(--duration-fast) var(--ease-spring);
}

.btn-guest svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-guest:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-hover);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

.btn-guest:active {
  transform: translateY(0);
}

/* ── Signup hint ─────────────────────────────────────────── */
.form-signup-hint {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.form-signup-hint a {
  color: var(--color-text-secondary);
  font-weight: var(--weight-medium);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1px;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}

.form-signup-hint a:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-secondary);
}

/* ── Footer links ────────────────────────────────────────── */
.form-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
  padding-top: var(--space-8);
  margin-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.form-footer a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-snug);
  transition: color var(--duration-fast);
}

.form-footer a:hover {
  color: var(--color-text-secondary);
}

.form-footer__sep {
  width: 3px;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--color-border-hover);
}

.form-footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-snug);
  width: 100%;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 960px) {
  :root {
    --brand-panel-width: 40%;
  }

  .brand-headline h1 {
    font-size: var(--text-2xl);
  }

  .brand-stats {
    gap: var(--space-6);
  }
}

/* Mobile — stack vertically */
@media (max-width: 680px) {
  .login-page {
    flex-direction: column;
  }

  .brand-panel {
    flex: 0 0 auto;
    padding: var(--space-8) var(--space-6);
    justify-content: flex-start;
    animation: slideUp var(--duration-slower) var(--ease-out-cubic) both;
  }

  .brand-features,
  .brand-stats {
    display: none;
  }

  .brand-headline h1 {
    font-size: var(--text-2xl);
  }

  .brand-headline p {
    font-size: var(--text-sm);
  }

  .brand-content {
    max-width: 100%;
  }

  .brand-headline {
    margin-bottom: var(--space-4);
  }

  .form-panel {
    flex: 1;
    padding: var(--space-8) var(--space-6);
    animation: slideUp var(--duration-slower) var(--ease-out-cubic) 0.1s both;
  }

  .form-panel::before {
    display: none;
  }

  .form-header h2 {
    font-size: var(--text-2xl);
  }
}

@media (max-width: 380px) {
  .form-panel {
    padding: var(--space-6) var(--space-4);
  }
}
