/* ============================================================
   PROJECT CONTROL — Auth Pages (Signup / Login)
   ============================================================ */

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

/* --- Left Panel (Branding) --- */
.auth-panel-left {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--sp-10);
  position: relative;
  overflow: hidden;
}

.auth-panel-left::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(58,134,255,0.1) 0%, transparent 65%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

.auth-panel-left::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0,194,168,0.07) 0%, transparent 65%);
  top: 100px;
  right: -60px;
  pointer-events: none;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-bottom: auto;
}

.auth-logo-icon {
  width: 34px;
  height: 34px;
  background: var(--accent-blue);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.auth-panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.auth-panel-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-4);
  line-height: 1.2;
}

.auth-panel-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: var(--sp-8);
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-feature-icon {
  width: 30px;
  height: 30px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.auth-panel-footer {
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* --- Right Panel (Form) --- */
.auth-panel-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10);
  overflow-y: auto;
}

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

.auth-form-header {
  margin-bottom: var(--sp-8);
}

.auth-form-header h2 {
  font-size: 1.75rem;
  margin-bottom: var(--sp-2);
}

.auth-form-header p {
  font-size: 0.9rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* --- Role Selector --- */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.role-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-4);
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

.role-option:hover {
  border-color: var(--border-hover);
  background: var(--surface-3);
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-option.selected-freelancer {
  border-color: var(--accent-blue);
  background: var(--accent-blue-dim);
}

.role-option.selected-client {
  border-color: var(--accent-teal);
  background: var(--accent-teal-dim);
}

.role-emoji { font-size: 2rem; }

.role-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.role-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.role-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  transition: all var(--t-base);
}

.role-option.selected-freelancer .role-check {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

.role-option.selected-client .role-check {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #000;
}

/* --- Name Fields Row --- */
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

/* --- Password Strength --- */
.password-wrap {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  line-height: 1;
  transition: color var(--t-fast);
}
.password-toggle:hover { color: var(--text); }

.strength-bar {
  height: 3px;
  background: var(--surface-3);
  border-radius: 2px;
  margin-top: var(--sp-2);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
  width: 0%;
}

.strength-fill.weak   { width: 25%; background: var(--red); }
.strength-fill.fair   { width: 50%; background: var(--yellow); }
.strength-fill.good   { width: 75%; background: var(--accent-blue); }
.strength-fill.strong { width: 100%; background: var(--accent-teal); }

.strength-label {
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-top: 4px;
}

/* --- Terms --- */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
}

.terms-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-blue);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.terms-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Submit Button Area --- */
.auth-submit {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.auth-btn {
  width: 100%;
  padding: 13px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}

.auth-btn .btn-loading {
  display: none;
  position: absolute;
  inset: 0;
  background: inherit;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}

.auth-btn.loading .btn-text { opacity: 0; }
.auth-btn.loading .btn-loading { display: flex; }

/* --- Divider --- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--text-faint);
  font-size: 0.75rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

/* --- Switch Link --- */
.auth-switch {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* --- Error State --- */
.field-error {
  font-size: 0.75rem;
  color: var(--red);
  margin-top: 4px;
  display: none;
}

.form-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}

.form-input.error:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: var(--sp-8) var(--sp-6); }
}

@media (max-width: 480px) {
  .name-row { grid-template-columns: 1fr; }
  .role-selector { grid-template-columns: 1fr; }
}
