/* Oasis Auth Module - Login, Reset Password, Forgot Password
   Uses CSS variables from master.css :root */

*, *::before, *::after { box-sizing: border-box; }

body.auth-page-body {
  margin: 0;
  font-family: var(--oasis-font);
  background: var(--oasis-base-bg);
  color: #363636;
  overflow-x: hidden;
}

.auth-page {
  display: grid;
  grid-template-columns: 1fr 2fr;
  min-height: 100dvh;
}

.auth-hero {
  background: var(--oasis-base-bg);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px clamp(56px, 10vw, 96px);
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 24px;
  font-weight: 300;
  margin: 0;
  line-height: 1.4;
}

.hero-footer {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  margin-top: auto;
}

.hero-footer p { margin: 0.25rem 0; }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
  background: #fff;
}

.auth-panel-inner {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.auth-logo img {
  max-height: 220px;
  width: auto;
}

.panel-title {
  font-size: 24px;
  font-weight: 500;
  color: var(--oasis-form-title);
  margin: 0;
}

.panel-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--oasis-form-desc);
  line-height: 1.6;
  margin: 0.25rem 0 0 0;
}

.form-separator {
  border-top: 1px solid var(--oasis-separator);
  margin: 0 0 0.5rem 0;
}

.auth-panel form {
  display: grid;
  gap: 1.5rem;
}

.float-field {
  position: relative;
}

.float-field .input-shell label {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 400;
  color: var(--oasis-label);
  pointer-events: none;
  transition: all 0.2s ease;
  background: #fff;
}

.float-field:focus-within .input-shell label,
.float-field.has-value .input-shell label {
  top: 0;
  transform: translateY(-100%);
  font-size: 12px;
  padding: 0 4px;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--oasis-input-border);
  border-radius: 12px;
  padding: 0 1rem;
  background: #fff;
}

.input-shell input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.75rem 0;
  font-size: 14px;
  font-family: var(--oasis-font);
  color: var(--oasis-input-value);
  min-width: 0;
}

.input-shell input::placeholder {
  color: transparent;
}

.input-shell input:focus {
  outline: none;
}

.toggle-password {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--oasis-eye-inactive);
  transition: color 0.2s;
}

.toggle-password:hover,
.toggle-password.active {
  color: var(--oasis-eye-active);
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  background: var(--oasis-btn);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--oasis-font);
  cursor: pointer;
  transition: filter 0.2s;
}

.auth-btn:hover {
  filter: brightness(1.05);
}

.auth-btn .btn-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-link {
  color: var(--oasis-link);
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  margin-top: 1rem;
}

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

.form-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.form-meta .auth-link {
  flex: 0 0 40%;
  margin-top: 0;
}

.form-meta .auth-btn {
  flex: 0 0 60%;
}

.auth-alert {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.auth-alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

.auth-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-alert.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

@media (max-width: 1024px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-hero {
    padding: 2rem;
    min-height: auto;
  }
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 20px; }
}

@media (max-width: 768px) {
  .auth-hero { display: none; }
  .auth-panel { padding: 2rem; }
}

@media (max-width: 480px) {
  .auth-panel { padding: 1.5rem; }
  .panel-title { font-size: 20px; }
  .panel-subtitle { font-size: 13px; }
}
