/* megasharex Auth Pages (Login & Register) */

:root {
  --ww-auth-header-h: 73px;
}

.ww-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ww-auth-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--ww-border);
  background: rgba(11, 17, 32, 0.9);
}

.ww-auth-header .ww-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ww-auth-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.ww-auth-panel {
  display: flex;
  justify-content: center;
  padding: 3.5rem 2.5rem 4rem;
}

.ww-auth-panel-content {
  background: var(--ww-bg-elevated);
  border-right: 1px solid var(--ww-border);
  position: relative;
  align-items: flex-start;
  padding-top: 4rem;
}

.ww-auth-panel-content::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse, var(--ww-accent-soft), transparent 70%);
  pointer-events: none;
}

.ww-auth-panel-form {
  background: var(--ww-bg);
  align-items: flex-start;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

/* Register: card stretches to bottom of content (not fixed) */
.ww-auth-register .ww-auth-main {
  align-items: stretch;
}

.ww-auth-register .ww-auth-panel-content {
  min-height: 100%;
}

/* Login: right form stays fixed, left content scrolls */
.ww-auth-login .ww-auth-panel-content {
  min-height: calc(100vh - var(--ww-auth-header-h));
}

.ww-auth-login .ww-auth-panel-form {
  position: sticky;
  top: var(--ww-auth-header-h);
  height: calc(100vh - var(--ww-auth-header-h));
  min-height: calc(100vh - var(--ww-auth-header-h));
  align-self: start;
  overflow: hidden;
}

.ww-auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

.ww-auth-form-wrap h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.ww-auth-form-wrap .ww-auth-subtitle {
  font-size: 0.9375rem;
  color: var(--ww-text-muted);
  margin: 0 0 2rem;
}

.ww-auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  font-size: 0.875rem;
}

.ww-auth-links a {
  color: var(--ww-accent);
  font-weight: 500;
}

.ww-auth-links a:hover {
  text-decoration: underline;
}

.ww-auth-submit {
  width: 100%;
  margin-top: 0.5rem;
}

select.ww-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

.ww-password-wrap {
  position: relative;
}

.ww-password-wrap .ww-input {
  padding-right: 3rem;
}

.ww-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--ww-text-muted);
  cursor: pointer;
  padding: 0;
}

.ww-password-toggle:hover {
  color: var(--ww-text);
}

.ww-eye-icon {
  display: block;
  flex-shrink: 0;
}

.ww-eye-icon.ww-eye-hidden {
  display: none;
}

.ww-auth-content-wrap {
  width: 100%;
  max-width: 480px;
  position: relative;
}

.ww-auth-content-wrap h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.ww-auth-content-wrap > p {
  font-size: 0.9375rem;
  color: var(--ww-text-muted);
  line-height: 1.7;
  margin: 0 0 2rem;
}

.ww-auth-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.ww-auth-stat {
  padding: 1.25rem;
  background: var(--ww-surface);
  border: 1px solid var(--ww-border);
  border-radius: var(--ww-radius-md);
}

.ww-auth-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ww-accent);
  margin-bottom: 0.25rem;
}

.ww-auth-stat span {
  font-size: 0.8125rem;
  color: var(--ww-text-muted);
}

.ww-auth-benefits {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.ww-auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--ww-text-2);
}

.ww-auth-benefits li svg {
  flex-shrink: 0;
  color: var(--ww-accent);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .ww-auth-main {
    grid-template-columns: 1fr;
  }

  .ww-auth-panel-content {
    border-right: none;
    border-bottom: 1px solid var(--ww-border);
    padding: 2.5rem 2rem 3rem;
    min-height: 0;
  }

  .ww-auth-panel-form {
    padding: 2.5rem 2rem 3.5rem;
  }

  .ww-auth-login .ww-auth-panel-content {
    min-height: 0;
  }

  .ww-auth-login .ww-auth-panel-form {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
}
