.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.1s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:hover {
  background: var(--surface-3);
  border-color: #2e3340;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-soft);
  border-color: rgba(239, 77, 77, 0.3);
  color: #ff9a9a;
}

.btn-danger:hover {
  background: rgba(239, 77, 77, 0.18);
  border-color: rgba(239, 77, 77, 0.45);
}

.btn-success {
  background: var(--success-soft);
  border-color: rgba(52, 196, 139, 0.3);
  color: #7ee2b8;
}

.btn-sm {
  height: 32px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.icon-btn.sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.icon-btn.sm svg {
  width: 15px;
  height: 15px;
}

.icon-btn.danger:hover {
  color: #ff9a9a;
  border-color: rgba(239, 77, 77, 0.4);
  background: var(--danger-soft);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Formularios ────────────────────────────────────────────────────────── */
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
}

.label {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-2);
}

.hint {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.hint b {
  color: var(--text-2);
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--muted-2);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #2e3340;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input:disabled,
.select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.textarea {
  height: auto;
  min-height: 88px;
  padding: 11px 13px;
  resize: vertical;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.input-group {
  display: flex;
  gap: 8px;
}

.input-icon {
  position: relative;
}

.input-icon > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  pointer-events: none;
}

.input-icon .input {
  padding-left: 36px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.55;
  cursor: pointer;
  margin-bottom: 15px;
}

.check input {
  margin-top: 2px;
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex: none;
}

.check b {
  color: var(--text);
  font-weight: 600;
}

.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
}

.form-error,
.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.form-error svg,
.form-success svg {
  width: 16px;
  height: 16px;
}

.form-error {
  background: var(--danger-soft);
  border: 1px solid rgba(239, 77, 77, 0.28);
  color: #ffa3a3;
}

.form-success {
  background: var(--success-soft);
  border: 1px solid rgba(52, 196, 139, 0.28);
  color: #86e3bd;
}

.form-error.show,
.form-success.show {
  display: flex;
}

/* ── Acceso ─────────────────────────────────────────────────────────────── */
