/* ============================================================
   register-new.css — Purified & Optimized
   Generated by: CSS Purifier & Optimizer Skill
   Rules applied: R1-R10
   Original: register.css
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES (:root + dark theme)
   ============================================================ */

/*
  register.css inherits all tokens from home.css and auth-base.css.
  Dark theme is fully covered by [data-theme="dark"] in home-new.css.
  No additional variables required.
*/

/* ============================================================
   2. RESET / BASE
   ============================================================ */

/* Inherits from home-new.css and auth-base-new.css */

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

.step-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
  text-align: center;
}

.role-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.sub-role-name {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
}

.upload-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.upload-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--text-2);
}

.file-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.file-size {
  font-size: 0.76rem;
  color: var(--text-2);
}

.footer-text {
  text-align: center;
  font-size: 0.83rem;
  color: var(--text-2);
}

.footer-text .footer-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.footer-text .footer-link:hover {
  text-decoration: underline;
}

/* ============================================================
   4. LAYOUT
   ============================================================ */

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-2);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 1rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width var(--transition);
  border-radius: 6px;
}

/* Role selection grid */
.role-selection-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Sub-role grid */
.sub-role-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Form row */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-group.col-6 {
  margin-bottom: 1.5rem;
}

.form-row > .col-6 {
  min-width: 0;
}

/* Form navigation */
.form-navigation {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-navigation .btn {
  flex: 1;
  justify-content: center;
}

/* Document upload */
#documentUploadFields {
  margin-bottom: 1.5rem;
}

/* ============================================================
   5. NAVIGATION / HEADER
   ============================================================ */

/* Inherits .auth-header-controls from auth-base-new.css */

/* ============================================================
   6. COMPONENTS
   ============================================================ */

/* Role option */
.role-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.role-option:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.role-option.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  outline: 3px solid rgba(var(--accent-rgb), 0.1);
}

.role-icon {
  width: 60px;
  height: 60px;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.45rem;
  color: var(--accent);
  transition: all var(--transition);
}

.role-option.selected .role-icon {
  background: var(--accent);
  color: var(--bg);
}

/* Sub-role option */
.sub-role-option {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.sub-role-option:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.sub-role-option.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  outline: 3px solid rgba(var(--accent-rgb), 0.1);
}

.sub-role-icon {
  width: 50px;
  height: 50px;
  background: rgba(var(--accent-rgb), 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.15rem;
  color: var(--accent);
  transition: all var(--transition);
}

.sub-role-option.selected .sub-role-icon {
  background: var(--accent);
  color: var(--bg);
}

/* Upload drop zone */
.upload-drop-zone {
  position: relative;
  min-height: 220px;
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.05), rgba(var(--accent-rgb), 0.02)),
    var(--bg-2);
  padding: 1rem;
  cursor: pointer;
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
  overflow: hidden;
}

.upload-drop-zone:hover {
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.03)),
    var(--bg-card-hover);
  transform: translateY(-1px);
}

.upload-drop-zone:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.upload-drop-zone.has-file {
  border-style: solid;
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.06);
}

.upload-drop-zone.is-invalid {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
  outline: 3px solid rgba(239, 68, 68, 0.08);
}

.upload-drop-zone.is-invalid .upload-icon,
.upload-drop-zone.is-invalid .upload-text {
  color: #ef4444;
}

.upload-placeholder {
  min-height: 186px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.25rem;
}

.upload-drop-zone.has-file .upload-placeholder {
  display: none;
}

.upload-icon {
  font-size: 1.9rem;
  color: var(--accent);
  margin: 0;
}

/* File preview */
.file-preview {
  display: none;
  height: 100%;
}

.upload-drop-zone.has-file .file-preview {
  display: block;
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.file-preview-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  background: var(--bg);
}

.file-preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
}

/* Auth extra actions */
.auth-extra-actions {
  margin-top: 1rem;
}

.auth-actions-row {
  display: flex;
  gap: var(--spacing-md, 1rem);
  margin-top: 1rem;
}

.auth-actions-row .btn {
  flex: 1;
  justify-content: center;
}

.auth-extra-actions .auth-footer {
  margin-top: 1rem;
  padding-top: 1rem;
}

/* ============================================================
   7. BUTTONS
   ============================================================ */

.btn-secondary {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border-2);
}

.btn-secondary:hover {
  background: var(--bg-3);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Success green — semantic color, no CSS var equivalent */
.btn-success {
  background: #10b981;
  color: var(--bg);
  border: none;
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-2px);
}

.btn-success:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

.btn-large {
  justify-content: center;
}

/* ============================================================
   8. MODALS & OVERLAYS
   ============================================================ */

/* Toast notification styles unified in main.css */

/* ============================================================
   9. UTILITIES
   ============================================================ */

/* Inherits .auth-footer, .footer-link from auth-base-new.css */

/* ============================================================
   10. RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .role-selection-container {
    grid-template-columns: 1fr;
  }

  .sub-role-container {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-navigation {
    flex-direction: column;
  }

  .upload-drop-zone {
    min-height: 200px;
  }

  .upload-placeholder {
    min-height: 166px;
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .auth-actions-row {
    flex-direction: column;
  }

  .auth-actions-row .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .role-option {
    padding: 1.5rem 0.75rem;
  }

  .role-icon {
    width: 50px;
    height: 50px;
    font-size: 1.15rem;
  }

  .sub-role-option {
    padding: 1.2rem 0.75rem;
  }

  .sub-role-icon {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }

  .upload-drop-zone {
    min-height: 180px;
    padding: 0.85rem;
  }

  .file-preview-image {
    height: 150px;
  }

  .upload-icon {
    font-size: 1.68rem;
  }

  .upload-text {
    font-size: 0.87rem;
  }
}
