/* ============================================================
   Studio Labs — Auth Pages (login, register)
   Dark theme, two-column layout, matches portfolio.css tokens
   ============================================================ */

/* ---- Page shell ---- */
.auth-page {
  background: var(--dark);
  min-height: 100vh;
}

/* ---- Two-column layout ---- */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: 64px; /* nav height */
}

/* ---- Brand panel (left) ---- */
.auth-panel--brand {
  background: var(--dark-surface);
  border-right: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
}

.auth-panel--brand::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.auth-panel--brand::after {
  content: '';
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(0,212,170,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-brand-badge .dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.auth-panel--brand h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.auth-panel--brand p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 36px;
}

/* Feature list */
.auth-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.auth-feature-list strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.auth-feature-list span {
  color: var(--text-muted);
  font-size: 0.83rem;
}

/* Registration steps */
.auth-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.auth-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.auth-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-step strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.auth-step span {
  color: var(--text-muted);
  font-size: 0.83rem;
}

/* Trust badges */
.auth-trust {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-trust-item {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ---- Form panel (right) ---- */
.auth-panel--form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  overflow-y: auto;
}

.auth-form-inner {
  width: 100%;
  max-width: 400px;
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.auth-form-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-form-header a {
  color: var(--primary);
}

.auth-form-header a:hover {
  color: var(--accent);
}

/* ---- Form elements ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label-link {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.form-label-link:hover {
  color: var(--primary);
}

.label-solo {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form textarea,
.form-select {
  width: 100%;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.auth-form input:focus,
.auth-form textarea:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}

.auth-form input::placeholder,
.auth-form textarea::placeholder {
  color: var(--text-dim);
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239494A8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Input with toggle button */
.input-wrapper {
  position: relative;
}

.input-wrapper input {
  padding-right: 44px;
}

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

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

/* Account type selector */
.account-type-select {
  display: flex;
  gap: 12px;
}

.account-type-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.account-type-option input[type="radio"] {
  display: none;
}

.account-type-option.selected {
  border-color: var(--primary);
  background: rgba(108,99,255,0.06);
}

.account-type-icon {
  font-size: 1.3rem;
}

.account-type-option strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}

.account-type-option span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.account-type-check {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  display: none;
  align-items: center;
  justify-content: center;
}

.account-type-option.selected .account-type-check {
  display: flex;
}

/* Checkbox */
.form-group--checkbox .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.form-group--checkbox input[type="checkbox"] {
  display: none;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1px solid var(--dark-border);
  border-radius: 4px;
  background: var(--dark-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  margin-top: 1px;
}

.form-group--checkbox input:checked + .checkbox-box {
  background: var(--primary);
  border-color: var(--primary);
}

.form-group--checkbox input:checked + .checkbox-box::after {
  content: '✓';
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Full-width button */
.btn-full {
  width: 100%;
  justify-content: center;
}

/* Small button */
.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--dark-border);
}

/* Legal text */
.auth-legal {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 16px;
  line-height: 1.6;
}

.auth-legal a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Feedback messages */
.auth-error,
.auth-success {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

.auth-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #FCA5A5;
}

.auth-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #86EFAC;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake { animation: shake 0.35s ease; }

/* Password strength */
.strength-track {
  height: 3px;
  background: var(--dark-border);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

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

.strength-bar.weak   { width: 25%; background: var(--danger); }
.strength-bar.fair   { width: 50%; background: var(--warning); }
.strength-bar.good   { width: 75%; background: #3B82F6; }
.strength-bar.strong { width: 100%; background: var(--success); }

.strength-label {
  font-size: 0.75rem;
  margin-top: 4px;
}

.strength-label--weak   { color: var(--danger); }
.strength-label--fair   { color: var(--warning); }
.strength-label--good   { color: #3B82F6; }
.strength-label--strong { color: var(--success); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-panel--brand {
    display: none;
  }

  .auth-panel--form {
    padding: 40px 24px;
    align-items: flex-start;
    min-height: calc(100vh - 64px);
  }

  .auth-form-inner {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ---- Toggle password helper ---- */

/* ---- Role badge ---- */
.role-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}
.role-badge--admin {
  background: rgba(108,99,255,0.18);
  color: #6c63ff;
  border: 1px solid rgba(108,99,255,0.35);
}
.role-badge--client {
  background: rgba(0,212,170,0.12);
  color: #00c49a;
  border: 1px solid rgba(0,212,170,0.3);
}
