/**
 * FORM & PROFILE STYLES
 */

/* Form Fields */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.form-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  font-family: inherit;
  resize: vertical;
}

.form-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow-subtle);
  outline: none;
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  cursor: pointer;
  appearance: auto;
}

textarea.form-input {
  min-height: 60px;
}

/* Checkbox Labels */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* Profile Avatar */
.profile-avatar-ring {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-crimson-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--accent-glow-subtle);
  overflow: hidden;
}

.profile-avatar-initial {
  font-size: 2rem;
  font-weight: var(--font-weight-black);
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 13, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px var(--accent-glow-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  padding: var(--space-6);
  color: var(--text-primary);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Studio & Tab Controls */
.studio-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-6);
  overflow-x: auto;
  padding-bottom: 2px;
}

.studio-tab-btn {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition-fast);
}

.studio-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.studio-tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  background: rgba(255, 42, 75, 0.08);
}

/* Code Editor Wrap */
.code-editor-wrap {
  position: relative;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: #06080f;
  overflow: hidden;
}

.code-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: #0d101a;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}

.code-textarea {
  width: 100%;
  height: 280px;
  background: transparent;
  color: #38bdf8;
  font-family: var(--font-family-mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 12px 14px;
  border: none;
  resize: vertical;
  outline: none;
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}

/* Starter Templates Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: var(--space-4);
}

.template-card-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.template-card-btn:hover, .template-card-btn.active {
  border-color: var(--accent-primary);
  background: rgba(255, 42, 75, 0.08);
}

.template-card-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.template-card-title {
  font-size: 12px;
  font-weight: 700;
}

.template-card-desc {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Gradient Presets */
.gradient-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.gradient-preset-chip {
  width: 36px;
  height: 24px;
  border-radius: var(--radius-xs);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.gradient-preset-chip:hover, .gradient-preset-chip.active {
  border-color: #ffffff;
  transform: scale(1.1);
}

